Errors Uj
Errors Uj
Errors Uj
3 Errors
Occurrence of error is unavoidable in the field of scientific computing. In-
stead, numerical analysts try to investigate the possible and best ways to
minimise the error. The study of the error and how to estimate and min-
imise it are the fundamental issues in error analysis.
e = x − x∗ .
7
1.3.3 Absolute and Relative Errors
Definition 3 (Absolute Error). The absolute error ê of the error e is defined
as the absolute value of the error e
ê = |x − x∗ |.
ê |x − x∗ |
ẽ = = , x 6= 0.
|x| |x|
Example 2. Let x = 3.141592653589793 is the value of the constant ratio π
correct to 15 decimal places and x∗ = 3.14159265 be an approximation of x.
Compute the following quantities:
a. The error.
Solution:
a. The error
8
1.3.4 Roundoff and Truncation Errors
Computers represent numbers in finite number of digits and hence some
quantities cannot be represented exactly. The error caused by replacing a
number a by its closest machine number is called the roundoff error and
the process is called correct rounding.
1. x1 = 1.34579.
2. x2 = 1.34679.
3. x3 = 1.34479.
4. x4 = 3.34379.
5. x5 = 2.34579.
Solution:
(i) Rounding:
(a) x1 = 1.35.
(b) x2 = 1.35.
(c) x3 = 1.34.
(d) x4 = 3.34.
(e) x5 = 2.35.
(ii) Chopping:
(a) x1 = 1.34.
(b) x2 = 1.34.
(c) x3 = 1.34.
(d) x4 = 3.34.
(e) x5 = 2.34.