Absolute and relative error

Level FundamentalDifficulty ★★★★★Concept⌖ Open in the map

What is it?

Absolute error ∣x−x^∣|x - \hat x| and relative error ∣x−x^∣/∣x∣|x - \hat x|/|x|. Relative error counts correct significant digits, and it is what floating point controls: every operation is exact up to a relative error of at most εmach≈1.1⋅10−16\varepsilon_{\text{mach}} \approx 1.1 \cdot 10^{-16} in double precision.

Formulas

eabs=∣x−x^∣,erel=∣x−x^∣∣x∣e_{\text{abs}} = |x - \hat x|, \qquad e_{\text{rel}} = \frac{|x - \hat x|}{|x|}
fl⁡(a∘b)=(a∘b)(1+δ),∣δ∣≤εmach=2−53\operatorname{fl}(a \circ b) = (a \circ b)(1 + \delta), \quad |\delta| \le \varepsilon_{\text{mach}} = 2^{-53}
the IEEE 754 model of arithmetic

Where it shows up in computing

  • Floating point (IEEE 754)★★★★★fundamentalScientific computing and algorithms

    Floating point is designed around a guaranteed relative error per operation.

  • Scientific computing★★★★★fundamentalScientific computing and algorithms

    Every numerical result should come with an error estimate; truncation and rounding errors are budgeted separately.

Where is it used?

Computing topics reachable from here, through the chain of ideas that leads to them:

What depends on it

This page has the essentials. A fuller treatment (intuition, formal definition, worked example) is on the way.

↑ ↓ to navigate · ↵ · Esc