This math scares me

David Fuess fuess at att.net
Tue Mar 13 08:37:46 EST 2001


On Mon, 12 Mar 2001 17:03:56 -0500, William Park <parkw at better.net>
wrote:

>On Mon, Mar 12, 2001 at 09:34:58PM +0000, costas at springmail.com wrote:
>> Ok, I can see maybe division having problems. But why does addition of
>> the two numbers below:
>> 
>> 5.01+5.54
>> 
>> give me this?
>> 
>> 10.550000000000001
>
>It's called 'Round-off error'.

Well, truncation error actually But who's counting? (The name derives
from truncating the infinite sequence to the finite number of bits
available for representing the floating point mantissa.)

Dave
>
>---William Park, Open Geometry Consulting, Linux/Python, 8 CPUs.




More information about the Python-list mailing list