Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
0.95 is actually 278419646001971/4503599627370496 which is smaller than 95/100. >>> from fractions import Fraction >>> Fraction(0.95) Fraction(4278419646001971, 4503599627370496) >>> Fraction(0.95) - Fraction(95, 100) Fraction(-1, 22517998136852480) It is closer to 0.9 than to 1.0. >>> Fraction(0.95) - Fraction(0.9) Fraction(450359962737049, 9007199254740992) >>> Fraction(1) - Fraction(0.95) Fraction(225179981368525, 4503599627370496) >>> (Fraction(1) - Fraction(0.95)) - (Fraction(0.95) - Fraction(0.9)) Fraction(1, 9007199254740992) ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38703> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com