I think there might be something wrong with the implementation of modulus. Negative float values close to 0.0 break the identity "0 <= abs(a % b) < abs(b)".
print 0.0 % 2.0 # => 0.0
print -1e-010 % 2.0 # =>1.9999999999
which is correct, but:
print -1e-050 % 2.0 # => 2.0
print -1e-050 % 2.0 < 2.0 # => False
This means I can't use modulus to "wrap around" before it reaches a
certain value. I'm using Python 2.4.2 on WindowsXP.
Thanks
Janto
--
http://mail.python.org/mailman/listinfo/python-list
