[G4] 2+2=4.0000001?

CJ Scaminaci halogenius at sbcglobal.net
Thu Feb 26 19:28:02 PST 2004


On Feb 26, 2004, at 9:20 PM, Amir 'CG' Caspi went on and on about:
>
> True, but they ARE accurate when you add base-2 numbers, which are
> perfectly representable.  2+2=4 should work accurately on all binary
> systems, even in floating-point.

Should being the key word ;) An integer operation still would have done 
the job here. Whoever wrote the calculator program was lazy, and 
decided to float all the numbers. This kind of problem could have been 
avoided if they determined the difference between an integer and 
another number, and used the correct operation where needed.

You make a good argument, nicely done.

CJ



More information about the G4 mailing list