This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients mark.dickinson, pacosta, rhettinger, tim.peters
Date 2014-06-11.12:25:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1402489542.74.0.899098718353.issue21712@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2014-06-11 12:25:42mark.dickinsonsetrecipients: + mark.dickinson, tim.peters, rhettinger, pacosta
2014-06-11 12:25:42mark.dickinsonsetmessageid: <1402489542.74.0.899098718353.issue21712@psf.upfronthosting.co.za>
2014-06-11 12:25:42mark.dickinsonlinkissue21712 messages
2014-06-11 12:25:42mark.dickinsoncreate