Roundoff Error — Definition, Formula & Examples
Roundoff error is the small difference that arises when you round or truncate a number instead of using its exact value. It occurs whenever a number with many (or infinitely many) decimal places is stored or written with fewer digits.
Roundoff error is the discrepancy between the true value of a quantity and its finite-digit approximation, defined as the absolute difference , where is the exact value and is the rounded representation.
Key Formula
Where:
- = The absolute roundoff error
- = The exact (true) value
- = The rounded approximation of x
How It Works
Every time you round a number, you introduce a small error. A single roundoff error is usually tiny, but when many rounded values are combined in a long calculation, these errors can accumulate and become significant. For instance, if you round intermediate results in a multi-step problem, the final answer may differ noticeably from the true result. Keeping extra decimal places during intermediate steps and rounding only at the end helps minimize this accumulation.
Worked Example
Problem: You measure a length as exactly meters. Your calculator displays 0.333. Find the roundoff error.
Identify values: The exact value is 1/3 and the rounded value is 0.333.
Compute the error: Subtract the rounded value from the exact value and take the absolute value.
Answer: The roundoff error is approximately meters, or about of a meter.
Why It Matters
In science and engineering courses, accumulated roundoff error can cause computed results to drift far from the correct answer, especially in simulations with millions of steps. Understanding roundoff error helps you decide how many decimal places to keep during a calculation and when to round your final result.
Common Mistakes
Mistake: Rounding intermediate steps and then rounding again at the end, compounding the error.
Correction: Keep as many decimal places as possible throughout your calculation and round only the final answer to the required precision.
