Round-off error

A round-off error is the difference between the calculated approximation of a number and its exact mathematical value. Numerical analysis specifically tries to estimate it 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.142857 0.142857 1/7000000
ln 2 0.69314718055994530941...   0.693147 0.00000018055994530941...
log10 2 0.30102999566398119521...   0.3010 0.00002999566398119521...
 2  1.25992104989487316476...   1.25992 0.00000104989487316476...
 2  1.41421356237309504880...   1.41421 0.00000356237309504880...
e 2.71828182845904523536...   2.718281828459045   0.00000000000000023536...
π 3.14159265358979323846...   3.141592653589793   0.00000000000000023846...
No matter how many digits it has, if the number of digits is finite, the error exists. This kind of error is unavoidable and is named round-off error.

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

0.142857 ≈ 0.142 (chopping at the 5th digits.)
0.142857 ≈ 0.143 (rounding at the 5th digits. This is round up   because the next digit, 8, is >= 5)
0.142857 ≈ 0.14   (rounding at the 4th digits. This is round down because the next digit, 2, is < 5)

See also

Truncation

See also: Round-off error, Algorithm, Approximation, Cubic root, E (mathematical constant), Equation, Logarithm, Mathematics, Natural logarithm