>In article <i4i8005okpeop8as8lqatm6ld1354qr2984ax.com>,

> Andy Hassall <andyandyh.co.uk> wrote:

>

Quote:

>>But there have to be compromises when storing floating point

>> numbers. For example, if you do 1.0/3.0, you get 0.33333 recurring. How do

>> you

>> store an infinite number of decimal places in a (small) finite space?

>

>But that's not what I'm doing. I'm doing addition. I'm taking 10.25 and

>adding it to 11.4.

>

>Why can't the computer recognize that as 21.65?

>

>If $total=21.65 and I compare that to 10.25+11.4, the fact that the

>computer might not be able to recognize a match perplexs me.

>

>I set $total=21.65 and ask it to print $total. It prints 21.65.

>

>I set $anotherTotal=10.25+11.4. I ask it to print $anotherTotal. It

>prints 21.65.

>

>_Then_ I ask it if $total equals $anotherTotal and is says "No."