Next: , Previous: , Up: Floating Point in Depth   [Contents][Index]

28.6 Exact Floating-Point Arithmetic

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:

Whenever a result requires more than n digits, rounding is needed.