[Python-Dev] Expert floats
ark-mlist at att.net
Tue Apr 6 11:09:37 EDT 2004
> I believe Ping would have
> >>> 2.20 - 1.20
As would I.
> because "1.0000000000000002" is the shortest string that evals to the true
> machine result. OTOH, he'd have
> >> 2.20 - 1.10
Believe it or not, this apparent anomaly doesn't bother me, but
does. The reason is that the first example does arithmetic, and it is easy
to explain that floating-point arithmetic is not completely accurate.
More information about the Python-Dev