round(22.47,2) gives 22.469999999999999?

Eric van Riet Paap eric at vanrietpaap.com
Wed Aug 6 07:12:21 EDT 2003


Hi,

On python2.1.3, python2.2.1 and python2.2.3 round(22.47,2) gives 
22.469999999999999 . Does anyone know if this is a bug or some weird, yet 
unexpected, behaviour?

P.S. I haven't tested python2.3, but python1.5.2 doesn't have this problem.





More information about the Python-list mailing list