Precision?

Peter Dembinski pdemb at gazeta.pl
Sun May 15 17:16:16 EDT 2005


"Steffen Glückselig" <usenet at gungfu.de> writes:

> Hello,
>
> I've just wanted to check Python's abilities as a calculator and this
> is what came out:
>
>>>> 1.0 + 3.0 + 4.6
> 8.5999999999999996
>
> Ehm, how could I get the intuitively 'correct' result of - say - 8.6?
> ;-)

This is as correct as your computer's FPU can made it :)

-- 
http://www.peter.dembinski.prv.pl



More information about the Python-list mailing list