Number Representations & States

"how numbers are stored in computers"

Relative rounding error

We will now formalize the idea that rounding a real number to its closest floating-point representation introduces a small relative error. This error behaves like a multiplicative perturbation bounded by machine epsilon - that is, any floating-point number you store can be thought of as the exact number times a factor very close to 1 (within a factor of ).

This theorem is crucial for reasoning about numerical stability and error propagation in floating-point computations.

Theorem

If and are floating-point numbers in a format with parameters and , and if subtraction is done with digits (i.e. one guard digit), then the relative rounding error in the result is less than .

Proof

There are two parts to the proof of this theorem (addition and subtraction), which are proved in Theorem 9 and Theorem 10.