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 Leengit
Recipients Leengit, mark.dickinson, rhettinger, serhiy.storchaka, zach.ware
Date 2022-02-17.19:07:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1645124841.29.0.590286274359.issue46780@roundup.psfhosted.org>
In-reply-to
Content
>It would return 1/7 for "0.1" and 1/4 for "0.2". Is it what you expected?

I answered "yes" before, but I am now thinking "no".  In the case of "0.1", the smallest numerator achievable is 1, but there are multiple denominators that would give a value within [0.05, 0.15).  So, I'd choose the denominator that gives the ratio that is closet to the input value.

This is similar to the "16e2" example but with the roles of numerator and denominator reversed.
History
Date User Action Args
2022-02-17 19:07:21Leengitsetrecipients: + Leengit, rhettinger, mark.dickinson, zach.ware, serhiy.storchaka
2022-02-17 19:07:21Leengitsetmessageid: <1645124841.29.0.590286274359.issue46780@roundup.psfhosted.org>
2022-02-17 19:07:21Leengitlinkissue46780 messages
2022-02-17 19:07:21Leengitcreate