What does it mean when you have something like n // float(m)
with division
imported from __future__
?
Ex:
>>> x = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]
>>> y = [2.0 // v for v in x]
>>> print y
[19.0, 9.0, 6.0, 4.0, 4.0, 3.0, 2.0, 2.0, 2.0, 2.0]
2.0 / 0.1
should yield a 20.0, but I got 19 using //
2.0 / 0.2
is normally a 10, but got a 9
2 / 0.4
is 5. Got 4
Ok... So it looks like it subtracts 1 from the usual answer if it could be an integral type. But then you get to the last one...
2.0 // 1.0
gives 2.0. Same as 2.0 / 1.0
...