Raymond Hettinger added the comment:
Here is an explanation for the behavior you're seeing:
https://docs.python.org/3/tutorial/floatingpoint.html
Here is another famous resource on the subject:
https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
For exact decimal arithmeti
New submission from Tony :
on the >>> prompt type:
>>>717161 * 0.01
7171.6101
the same goes for
>>>717161.0 * 0.01
7171.6101
You can easily find more numbers with similar problem:
for i in range(100):
if len(str(i * 0.01)) > 12:
print(i, i * 0.01)
I am sure, th