Ammar Askar added the comment:

You've ran into a classic floating point number limitation. 
Please read the following doc page: 
https://docs.python.org/2/tutorial/floatingpoint.html

The problem comes when you multiply the number by 100, which is what causes the 
precision loss and drops it by a penny.

>>> 1108431.38 * 100
110843137.99999999
>>> int(110843137.99999999)
110843137

If this is for currency, I would suggest you use the decimal module 
https://docs.python.org/2/library/decimal.html

----------
nosy: +ammar2

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27697>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to