Errors in Numerical Computation
Errors in Numerical Computation
Machine epsilon
We know that a computer has a finite word length, so only a fixed number of digits is stored
and used during computation. Hence, even in storing an exact decimal number in its
converted form in the computer memory, an error is introduced. This error is machine
dependant and is called machine epsilon.
(1) Inherent errors: Errors which are already present in the statement of a problem before its
solution are called inherent errors. Such errors arise either due to the fact that the given data
is approximate or due to limitations of mathematical tables, calculators, or the digital
computer.
Inherent errors can be minimized by taking better data or by using high precision computing
aids. Accuracy refers to the number of significant digits in a value, for example, 53.965 is
accurate to 5 significant digits. Precision refers to the number of decimal positions or order of
magnitude of the last digit in the value. For example, in 53.965, precision is 10–3.
Example. Which of the following numbers has the greatest precision? 4.3201, 4.32,
4.320106.
(2) Rounding errors: Rounding errors arise from the process of rounding off numbers
during the computation. They are also called procedural errors or numerical errors. Such
errors are unavoidable in most of the calculations due to limitations of computing aids. These
errors can be reduced, however, by
(i) changing the calculation procedure so as to avoid subtraction of nearly equal numbers or
division by a small number
(ii) retaining at least one more significant digit at each step and rounding-off at the last step.
(3) Truncation errors: Truncation errors are caused by using approximate results or by
replacing an infinite process with a finite one. If we are using a decimal computer having a
fixed word length of 4 digits, rounding-off of 13.658 gives 13.66, whereas truncation gives
13.65.
(4) Absolute error. Absolute error is the numerical difference between the true value of a
quantity and its approximate value. Thus, if X is the true value of a quantity and X / is its
approximate
value, then | X – X/ | is called the absolute error ea.
ea = | X – X/ | = | Error |
(5) Relative error. The relative error er is defined by
Error X −X ¿
er = =
True value X
NOTE: The relative and percentage errors are independent of units used while absolute
error is expressed in terms of these units.
HOMEWORK1: Find the relative error if the number X=0.004997 is i) truncated to three
decimal digits ii) rounded off to three decimal digits.