[issue16460] Strange results for floor division ("//") with non-integer divisors

Martin v. Löwis report at bugs.python.org
Wed Nov 14 11:01:06 CET 2012


Martin v. Löwis added the comment:

Zitat von Tom Pohl <report at bugs.python.org>:

> This is not: 1 // 0.1 = 9.0 because math.floor(1/0.1) is able to  
> come up with the result that is expected from an operator called  
> "floor division".

You apparently assume that it is possible to give a definition to FD
for floating point that is less confusing. I do not think that this
is possible; in particular, I believe that definining x//y as
math.floor(x/y) is also confusing, in other cases (without being able
to construct such cases right away).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16460>
_______________________________________


More information about the Python-bugs-list mailing list