Mark Dickinson added the comment: Agreed with Tim.
Oddly enough[1], remembering that with binary floating-point numbers, what you see is not what you get[2], it turns out that 8.881784197001252e-16 (= Fraction(1, 1125899906842624)) is in fact *exactly* the right answer, in that it's a generator for the additive subgroup of the rationals generated by 2.7 (= Fraction(3039929748475085, 1125899906842624)) and 107.3 (=Fraction(7550566250263347, 70368744177664)). [1] Actually not so odd, given that % is a perfectly exact operation when applied to two positive finite floats. [2] https://docs.python.org/2/tutorial/floatingpoint.html ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21712> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com