ULPs, Relative Error, and Machine Epsilon

Several terms describe the magnitude of rounding error. A floating-point approximation to a real constant or to a computed result may err by as much as 1/2 unit in the last place (the bP-1 bit). The abbreviation ULP represents the measure "unit in the last place." Another measure of the rounding error uses the relative error, which is the difference between the exact number and its approximation divided by the exact number. The relative error that corresponds to 1/2 ULP is bounded by:

1/2 2-P <= 1/2 ULP <= 2 -P.

The upper bound EPS = 2-P, the machine epsilon, is commonly used in discussions of rounding errors because it expresses the smallest floating-point number that you can add to 1.0 with a result that does not round to 1.0.

Additional guard bits are included in floating-point hardware to allow rounding on the order of EPS. The result of any one floating-point operation is therefore tolerably imprecise, but the total error that results from many such operations on propagated numbers accumulates unavoidably.