what is this?

Peter Otten __peter__ at web.de
Sat Nov 1 20:56:25 CET 2003


Herbert Fritsch wrote:

>>>> b / (2.0 + a)
> 0.80000000000000004
> 
> There must be something wrong. I' running the new Suse 9.0.

No :-)

That's the way *all* floating point operations work, nothing python-specific
here. See

http://www.python.org/doc/faq/general.html#why-are-floating-point-calculations-so-inaccurate

Peter




More information about the Python-list mailing list