22.800000 and a 1 on the end!!??

Fuzzyman fuzzyman at gmail.com
Sun May 25 16:03:14 EDT 2008


On May 25, 8:58 pm, notnorweg... at yahoo.se wrote:
> >>> x = 5
> >>> x /= 2
> >>> x
> 2
> >>> x *=11.4
> >>> x
>
> 22.800000000000001
>
> ok where does the 1 in the come from?

Floating point arithmetic.

Michael Foord
http://www.ironpythoninaction.com/



More information about the Python-list mailing list