Next: Rounding, Previous: Floating Arithmetic Exception Flags, Up: Floating Point in Depth [Contents][Index]
As long as the numbers are exactly representable (fractions whose denominator is a power of 2), and intermediate results do not require rounding, then floating-point arithmetic is exact. It is easy to predict how many digits are needed for the results of arithmetic operations:
n + 1
digits, but
when the exponents differ, many more digits may be needed;
Whenever a result requires more than n digits, rounding is needed.