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 steven.daprano
Recipients izaakweiss, steven.daprano
Date 2016-07-07.16:23:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1467908584.22.0.167032147367.issue27463@psf.upfronthosting.co.za>
In-reply-to
Content
The behaviour of both are correct: the binary float nearest to 4.4 is just a smidgen *bigger* than the exact decimal 4.4, so 44//4.4 truncates to 9.0. But floor(44/4.4) evaluates 44/4.4 first, and that rounds rather than truncating, giving 10.0, which then floors to 10.

If you want to propose a documentation patch, that will be considered, but keep in mind that the Python docs cannot and should not be the place to document all the hairy corners of floating point arithmetic.
History
Date User Action Args
2016-07-07 16:23:04steven.dapranosetrecipients: + steven.daprano, izaakweiss
2016-07-07 16:23:04steven.dapranosetmessageid: <1467908584.22.0.167032147367.issue27463@psf.upfronthosting.co.za>
2016-07-07 16:23:04steven.dapranolinkissue27463 messages
2016-07-07 16:23:04steven.dapranocreate