"Andrew Koenig" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> I disagree. For any two floating-point numbers a and b, with b != 0, it > is always possible to represent the exact value of a mod b as a > floating-point number--at least on every floating-point system I have ever > encountered. The implementation is not even that difficult. Oops... This statement is true for the Fortran definition of modulus (result has the sign of the dividend) but not the Python definition (result has the sign of the divisor). In the Python world, it's true only when the dividend and divisor have the same sign. -- http://mail.python.org/mailman/listinfo/python-list