Floating point multiplication in python

xyz xyzhtml at 163.com
Tue Sep 6 07:57:31 CEST 2011


hi all:

As we know ,  1.1 * 1.1 is 1.21 . 
But in python ,I got following :

>>> 1.1 * 1.1
1.2100000000000002

why python get wrong result? Who can tell me  where's the 0.0000000000000002 from?



More information about the Python-list mailing list