Serhiy Storchaka added the comment: Yes, this is related to the internal representation of floating-point numbers. 0.1 is 3602879701896397/36028797018963968 in float.
>>> import fractions >>> fractions.Fraction(0.1) Fraction(3602879701896397, 36028797018963968) >>> 36028797018963968 / 3602879701896397 10.0 >>> 36028797018963968 // 3602879701896397 9 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16460> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com