in reply to Re: perl subtraction
in thread perl subtraction

Hi,

But
perl -e "print 100.61 + 100.33 - 200.94"
works correctly.

Replies are listed 'Best First'.
Re^3: perl subtraction
by ikegami (Patriarch) on Jan 10, 2010 at 09:38 UTC
    Sometimes the errors cancel out. Floats also do a bit of rounding for you to try to avoid problems. You need to do some of your own.