Round-off error

From Free net encyclopedia

(Redirected from Rounding error)

A round-off error, also called rounding error, is the difference between the calculated approximation of a number and its exact mathematical value. Numerical analysis specifically tries to estimate this error when using approximation equations and/or algorithms, especially when using finite digits to represent infinite digits of real numbers.

Example

Notation Represent Approximate Error
1/7 0.142 857 0.142 857 1/7000 000
ln 2 0.693 147 180 559 945 309 41...   0.693 147 0.000 000 180 559 945 309 41...
log10 2 0.301 029 995 663 981 195 21...   0.3010 0.000 029 995 663 981 195 21...
 2  1.259 921 049 894 873 164 76...   1.25992 0.000 001 049 894 873 164 76...
 2  1.414 213 562 373 095 048 80...   1.41421 0.000 003 562 373 095 048 80...
e 2.718 281 828 459 045 235 36...   2.718 281 828 459 045   0.000 000 000 000 000 235 36...
π 3.141 592 653 589 793 238 46...   3.141 592 653 589 793 0.000 000 000 000 000 238 46...
It does not matter how many digits a representation has. If a representation has finitely many digits, there will be error for uncountably many real numbers. This kind of error is unavoidable for conventional representations of numbers.

There are, at least, two ways of performing the termination at the limited digit place:

  • chopping or truncation: simply chop off the remaining digits.
0.142857 ≈ 0.142 (chopping at the 5th digits.)
  • rounding: add 5 to the next digit and then chop it. The result may round up or round down.
0.142857 ≈ 0.143 (rounding at the 5th digits. This is rounded up because the next digit, 8, is >= 5)
0.142857 ≈ 0.14 (rounding at the 4th digits. This is rounded down because the next digit, 2, is < 5)

Template:Mathanalysis-stub

See also

es:Redondeo pl:Błąd przybliżenia pt:Erro de arredondamento