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 Kostis Gourgoulias
Recipients Kostis Gourgoulias, ned.deily, ronaldoussoren
Date 2020-02-20.16:25:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1582215956.02.0.936078092318.issue39703@roundup.psfhosted.org>
In-reply-to
Content
This was brought to my attention by a colleague, Albert B.

When considering the floor division // operator, 1//0.01 should return 100.0, but instead returns 99.0. My understanding is that this is because 0.01 is represented by 

Decimal('0.01000000000000000020816681711721685132943093776702880859375')

which is greater than 0.01.

math.floor(1/0.01) correctly outputs 100. Shouldn't the two approaches provide the same answer?
History
Date User Action Args
2020-02-20 16:25:56Kostis Gourgouliassetrecipients: + Kostis Gourgoulias, ronaldoussoren, ned.deily
2020-02-20 16:25:56Kostis Gourgouliassetmessageid: <1582215956.02.0.936078092318.issue39703@roundup.psfhosted.org>
2020-02-20 16:25:55Kostis Gourgouliaslinkissue39703 messages
2020-02-20 16:25:55Kostis Gourgouliascreate