Quantifying Finite-Precision Error

A stored or reported number often replaces an exact value. Round-off selects the nearest representable value, while truncation discards digits beyond a chosen place without checking the next digit. These operations usually give different approximations and different error directions.

A generic exact value lies between adjacent representable grid points; truncation moves one way, while rounding selects the nearer point.

A generic exact value lies between adjacent representable grid points; truncation moves one way, while rounding selects the nearer point.


If xx is exact and x~\tilde x is approximate, the signed error is x~−x\tilde x-x, the absolute error is ∣x~−x∣|\tilde x-x|, and the relative error is


∣x~−x∣∣x∣,x≠0.\frac{|\tilde x-x|}{|x|},\qquad x\ne0.


Relative error is often reported as a percentage. It compares error with the scale of the quantity, whereas absolute error retains the quantity's units.

Bounds from reported precision

A value rounded to the nearest unit hh represents an interval extending h/2h/2 on either side. A value truncated at unit hh has a one-sided uncertainty smaller than hh, with direction depending on the sign and convention. Bounds matter because an exact hidden value usually cannot be recovered.


Worked example: Suppose an exact mass is 6.8374 g6.8374\ \mathrm{g}. Rounding to the nearest hundredth gives 6.84 g6.84\ \mathrm{g}, with signed error 0.0026 g0.0026\ \mathrm{g}. Truncating to the same place gives 6.83 g6.83\ \mathrm{g}, with signed error −0.0074 g-0.0074\ \mathrm{g}. The rounded approximation is closer in this case, but repeated calculations can make errors accumulate or partly cancel.

Accumulated error when a balance is rounded after each update

Accumulated error when a balance is rounded after each update


For a calculated quantity ff, small input errors can be estimated with differentials. For example, if A=LWA=LW, then a conservative first-order bound is ∣ΔA∣≈W∣ΔL∣+L∣ΔW∣|\Delta A|\approx W|\Delta L|+L|\Delta W|. This separates the contributions from both measured inputs.


A common mistake is to treat finite-precision arithmetic as ordinary real-number arithmetic. Rounding after every operation can destroy small contributions after adding them to a much larger number, and changing parentheses can then change the computed result.


Keep guard digits during intermediate work and round once at the requested final precision unless a problem specifies otherwise.

The exact value 8.3768.376 lies between adjacent hundredth-place grid points as in the figure. Which pair gives, respectively, truncation and rounding to two decimal places?

A generic exact value lies between adjacent representable grid points; truncation moves one way, while rounding selects the nearer point.

A generic exact value lies between adjacent representable grid points; truncation moves one way, while rounding selects the nearer point.

Accumulated error when a balance is rounded after each update

Accumulated error when a balance is rounded after each update

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

An exact concentration 12.4786 mol m−312.4786\ \mathrm{mol\,m^{-3}} is rounded to three decimal places. What is the absolute round-off error?

Give your answer in mol m^-3.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

The graph was produced by multiplying a balance by 1.0131.013 at each update and rounding the stored balance to cents, while retaining an unrounded reference calculation. What does the sign change in the plotted error demonstrate?

A generic exact value lies between adjacent representable grid points; truncation moves one way, while rounding selects the nearer point.

A generic exact value lies between adjacent representable grid points; truncation moves one way, while rounding selects the nearer point.

Accumulated error when a balance is rounded after each update

Accumulated error when a balance is rounded after each update

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors