Next: Cancellation (``Loss-of Significance'') Errors
Up: Tipical pitfalls with floating
Previous: Funny conversions
data a /3.0/, b /10.0/
data x /3.0/, y /10.0/
z = (y/x)-(b/a)
may produce a nonzero result. This is so because z is computed with register operands
(and FP registers for Pentium are in extended precision, 80 bits)
while for c the operands a and b are stored in the memory.
(note that the Alpha compiler produces zero).