round(22.47,2) gives 22.469999999999999?

Damien Wyart damien.wyart at free.fr
Wed Aug 6 13:17:51 CEST 2003


* Eric van Riet Paap <eric at vanrietpaap.com> in comp.lang.python:
> On python2.1.3, python2.2.1 and python2.2.3 round(22.47,2) gives
> 22.469999999999999 .

This is explained in detail at
<http://www.python.org/doc/current/tut/node14.html>.

-- 
Damien Wyart




More information about the Python-list mailing list