2+2=4.0000001?

CJ Scaminaci halogenius at sbcglobal.net
Thu Feb 26 19:18:14 PST 2004


	This is a roundoff error from the FPU. In a calculator (in 10.2 and 
10.3 at least), they use the floating point unit for all calculations. 
Floating point calculations aren't known (at least from a programming 
point of view) for being accurate in all cases ;).

	In this instance, they used a floating point calculation when a simple 
integer operation would have worked. The FPU rounds numbers, even whole 
numbers sometimes, unnecessarily. This causes errors, as seen in this 
instance.

	Also, this is very hard to reproduce, because of how the FPU works. 
Normally it would know better than to round a whole number. Here, that 
wasn't the case. Just a simple mistake on the part of the FPU.

--CJ



More information about the G4 mailing list