Steven D'Aprano added the comment:

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.

----------
nosy: +steven.daprano

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27463>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to