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 tom.pohl
Recipients mark.dickinson, serhiy.storchaka, skrah, tom.pohl
Date 2012-11-12.09:12:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1352711578.48.0.177516383558.issue16460@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks for your comments. From a technical/numerical point of view I agree with you that the computed result is correct given the floating-point limitations.

From a user's point of view (and the documentation seems to agree with me) the result is wrong. The documentation (see link in first post) says: [...] the result is that of mathematical division with the ‘floor’ function applied to the result.

math.floor(1/0.1) returns the expected 10.0 and the doc says that the floor division should behave the same.

If 9.0 for 1//0.1 is the correct result according to your definition of the floor division then I cannot think of a reasonable use case for the floor division.
History
Date User Action Args
2012-11-12 09:12:58tom.pohlsetrecipients: + tom.pohl, mark.dickinson, skrah, serhiy.storchaka
2012-11-12 09:12:58tom.pohlsetmessageid: <1352711578.48.0.177516383558.issue16460@psf.upfronthosting.co.za>
2012-11-12 09:12:58tom.pohllinkissue16460 messages
2012-11-12 09:12:58tom.pohlcreate