[issue32543] odd floor division behavior
Steven D'Aprano
report at bugs.python.org
Fri Jan 12 18:47:33 EST 2018
Steven D'Aprano <steve+python at pearwood.info> added the comment:
That does look at first glance like a bug in // to me. 0.9/0.1 is correctly rounded to 9.0 exactly, so flooring it should return 9 (as it does):
# Python 3.5 on Linux
py> 0.9/0.1 == 9
True
py> math.floor(0.9/0.1)
9
So I too would expect that 0.9//0.1 should evaluate as 9, not 8.
----------
nosy: +mark.dickinson, steven.daprano, tim.peters
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32543>
_______________________________________
More information about the Python-bugs-list
mailing list