[New-bugs-announce] [issue16460] Strange results for floor division ("//") with non-integer divisors
report at bugs.python.org
Mon Nov 12 09:25:05 CET 2012
New submission from Tom Pohl:
According to the documentation of the floor division (http://docs.python.org/2/reference/expressions.html#binary-arithmetic-operations), x//y should be equal to math.floor(x/y).
However, the result of 1//0.1 is 9.0 (tested on 2.6, 2.7, 3.2).
It might be related to the internal representation of floating-point numbers, but for this example I would expect it to come up with the correct values.
title: Strange results for floor division ("//") with non-integer divisors
versions: Python 2.6, Python 2.7, Python 3.2
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce