A bug or a documentation error

Nadav Horesh nadavh at envision.co.il
Thu Sep 14 17:11:13 EDT 2000


>>> math.fmod.__doc__
'fmod(x,y)\012\012Return x % y.'
>>> math.fmod(-3.2,1)
-0.20000000000000018
>>> (-3.2)%1
0.79999999999999982

This was taken from Python 2.0b1, but it is very much the same in 1.5.2:

Is the __doc__ string wrong or is it a bug?

    Nadav.





More information about the Python-list mailing list