Round-off and Truncation Error
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.
If x is exact and x~ is approximate, the signed error is x~−x, the absolute error is ∣x~−x∣, and the relative error is
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 h represents an interval extending h/2 on either side. A value truncated at unit h has a one-sided uncertainty smaller than h, 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 g. Rounding to the nearest hundredth gives 6.84 g, with signed error 0.0026 g. Truncating to the same place gives 6.83 g, with signed error −0.0074 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
For a calculated quantity f, small input errors can be estimated with differentials. For example, if A=LW, then a conservative first-order bound is ∣ΔA∣≈W∣ΔL∣+L∣Δ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.
An exact concentration 12.4786 molm−3 is rounded to three decimal places. What is the absolute round-off error?
Give your answer in mol m^-3.
The graph was produced by multiplying a balance by 1.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.
Accumulated error when a balance is rounded after each update