Author steven.daprano
Recipients izaakweiss, steven.daprano
Date 2016-07-07.16:23:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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.
Date User Action Args
2016-07-07 16:23:04steven.dapranosetrecipients: + steven.daprano, izaakweiss
2016-07-07 16:23:04steven.dapranosetmessageid: <>
2016-07-07 16:23:04steven.dapranolinkissue27463 messages
2016-07-07 16:23:04steven.dapranocreate