notesonly.in

One notebook for every subject — open it anywhere.

Log in

Truncation and Round-Off Errors: Numerical Error Basics

Every computed answer carries a small error. Round-off error comes from computers storing only a limited number of digits, so exact values get chopped or rounded to fit. Truncation error comes from stopping an infinite process early, like using only the first few terms of an infinite series. These two errors are the foundation of numerical error analysis.

These errors matter because real decisions rest on computed answers. A bridge simulation or a weather forecast is trustworthy only if we know how large the error can be. Numerical methods exist to measure these errors and keep them small enough for the accuracy we need.

Key Concepts

  • Absolute error: the size of the mistake, |true value − approximate value|, in the same units as the quantity (metres, rupees).
  • Relative error: absolute error divided by the true value — unitless, often a percentage. A 1 cm error on a 1 m stick is 1 percent; on a 1 km road it is 0.0001 percent.
  • Truncation error: error from stopping an infinite process, e.g. replacing a function by its first n Taylor-series terms.
  • Machine precision: the smallest number a computer can add to 1 and detect — about 2.2 × 10^-16 in double precision.

Formulas

  • Absolute error: E_abs = |x − x*|, where x is the true value and x* is the approximation.
  • Relative error: E_rel = |x − x*| / |x|, valid only when x ≠ 0.
  • Rounding error bound: if a number is rounded to k decimal places, the error is at most 0.5 × 10^−k.
  • Truncation error of a Taylor approximation: using the first n terms about a, the error is about f^(n+1)(ξ) h^n+1 / (n+1)!, where h is the step and ξ lies between a and a + h. Requires f to be differentiable n + 1 times; the error shrinks fast for small h.

Worked Example

Approximate e^0.1 with the first two Taylor terms about 0: e^x ≈ 1 + x gives 1.1, and the dropped tail (x²/2 + x³/6 + …) is the truncation error. The true value is ≈ 1.105170918. Absolute error = |1.105170918 − 1.1| = 0.005170918. Relative error = 0.005170918 / 1.105170918 ≈ 0.004678 ≈ 0.47 percent. Rounding the true value to four decimals gives 1.1052, with round-off error 0.000029082 — below the bound 0.5 × 10^−4 = 0.00005, as expected.

Common Misconceptions

  • "Round-off error comes only from rounding numbers by hand." In practice it comes from the computer itself: every stored number is rounded to a fixed number of binary digits, so even simple arithmetic introduces tiny errors.
  • "More terms or decimals always help." More terms cut truncation error but each computation adds round-off error, so there is a sweet spot — pushing further can make the answer worse.
  • "Small errors cancel out over many steps." They can also accumulate or amplify — a tiny initial error may grow at every step, so a precise-looking result can be completely wrong. Error analysis must precede trusting a long computation.

Real-World Applications

  • Engineering simulations (bridges, aircraft, crash tests) quote answers with error bounds so designers know the safety margins.
  • Weather models run on grids of millions of points; round-off and truncation error control how many days a forecast stays reliable.
  • Space missions use high-precision arithmetic because tiny round-off errors can miss a planet by thousands of kilometres.

Round-off error comes from finite digit storage, truncation error from stopping infinite processes early; absolute and relative error measure the damage. Tracking both is what separates a careful computation from a guess.