You are on page 1of 8

Errors in Numerical Calculations Unit 1

Unit 1 Errors in Numerical Calculations


Structure
1.1 Introduction
1.2 Accuracy of Numbers
1.3 Significant digits or Significant figures
1.4 Numbers rounded-off to n significant digits
1.5 Errors and their computations
1.5.1 Inherent errors
1.5.2 Rounded-off errors
1.5.3 Truncation errors
1.6 Absolute, Relative and Percentage errors
1.7 Summary
1.8 Exercises

1.1 Introduction
Application of computer-oriented numerical methods has become an integral
part of life of all modern engineers and scientists. The wide spread use of
modern high speed electronic digital computers and increasing demand for
numerical solutions to various problems, numerical methods have been
successfully applied to study problems in engineering, computer science,
mathematics and physical sciences such as biophysics, physics,
atmospheric sciences and geosciences. The art and science of preparing
and solving scientific and engineering problems have undergone
considerable changes since mathematical problem is reduced to a form
amenable to machine solution and several million operations are performed
per minute on a high-speed computer.

Numerical computing is an approach for solving complex mathematical


problems using only simple basic arithmetic operations. (The basic
Computer Oriented Numerical Methods Page No.: 1
Errors in Numerical Calculations Unit 1

arithmetic operations performed by the computer are addition, subtraction,


multiplication and division). Numerical Computing methods usually deal with
the following methods:
1. Solution of matrix problems
2. Finding roots of the equations
3. Interpolation and regression analysis
4. Numerical Integration and differentiation
5. Solution of ordinary differential equations
6. Boundary value problems
7. Solving systems of linear algebraic equations.

Numerical methods are often, of a repetitive nature. These consist of


repeated execution of the same process where at each step the result of the
preceding step is used. This is known as Iteration process and is repeated
till the result is obtained to a desired degree of accuracy.

The aim of Numerical analysis is to provide efficient methods for obtaining


numerical answers to a given problem. When solving problems one usually
starts with some initial data and then computes the iterations. The numerical
data used are only approximate and sometimes, the methods used are also
approximate and therefore the error in a computed result may be due to the
errors in the data or the errors in the method or both.

Numerical methods play a very important fundamental role in present-day


scientific research. One reason for this is that numerical methods can give
solution to a problem when ordinary analytical methods fail. For example in
finding the roots of transcendental equations or in solving non-linear
differential equations. It is therefore clear that training in applied sciences or
engineering would be incomplete without an adequate understanding of
numerical methods.

Computer Oriented Numerical Methods Page No.: 2


Errors in Numerical Calculations Unit 1

1.2 Accuracy of Numbers


There are two kinds of numbers, exact and approximate numbers. The

1 3
numbers like 1, 2, 3, ….., ( = 0.5), (= 1.5), ….. are treated as exact
2 2

numbers. But there are numbers


2
7
(= 0.285714….),  (= 3.14159….),

2 (= 1.4142….), e (= 2.71828….) which cannot be expressed by a finite


number of digits. These may be approximated by numbers 0.2857, 3.1416,
1.4142, 2.7183 respectively by omitting some digits, then these numbers are
called approximate numbers. Thus numbers represent the given numbers to
a certain degree of accuracy are called approximate numbers. For example,

the approximate value of  is 3.1416 or if we desire a better approximation,


it is 3.1415926589793, but we cannot write the exact value of .
1.3 Significant digits or Significant figures
The digits that are used to express a number are called significant digits or
significant figures. Thus each of the numbers 3.1416, 0.60125 and 4.0002
contain five significant digits while the numbers 0.00386, 0.000587 and
0.00205 contain only three significant digits, since zeros only help to fix the
position of the decimal point.

The following statements describe the notion of significant digits,


1. All non-zero digits are significant
2. All zeros occurring between non-zero digits are significant digits.
3. Trailing zeros following a decimal point are significant. For example
3.500, 65.00 and 0.3210 have four significant digits each.
4. Zeros between the decimal point and preceding a non-zero digit are not
significant.

Computer Oriented Numerical Methods Page No.: 3


Errors in Numerical Calculations Unit 1

The following numbers have four significant digits,


0.0001234, 0.002001, 0.01321
5. When the decimal point is not written, trailing zeros are not considered
to be significant. For example 4500 may be written as 45102 and
contains only two significant digits.
Example 1:
7.560 has four significant digits
25000 has two significant digits
2.0004 has six significant digits
0.04500 has four significant digits
0.0201 has three significant digits
0.00001 has one significant digit
100.00001 has eight significant digits

1.4 Numbers rounded-off to n significant digits


To round-off a number to n significant digits, discard all digits to the right of
the nth digits and if this discarded number is
i) less than half a unit in the nth place, leave the nth digit unchanged.
ii) greater than half the nth place, increase the nth digit by unity.
iii) exactly half a unit in the nth place, increase the nth digit by unity if it is
odd, otherwise leave it unchanged.
The number thus rounded-off is said to be correct to n significant digits.

Example 2: The following numbers rounded-off to four significant digits:


7.8926 to 7.893
128.614 to 128.6
3.14159 to 3.142
0.859321 to 0.8593
84767 to 84770

Computer Oriented Numerical Methods Page No.: 4


Errors in Numerical Calculations Unit 1

1.5 Errors and their computations


The quantity,
(Exact value) – (Approximate value) is called the Error.
In any Numerical computation, we come across the following types of errors.

1.5.1 Inherent errors


Errors which are already present in the statement of a problem before its
solution, are called inherent errors. This inherent error arises either due to
the given data being approximate or due to the limitations of computing aids.
In computations, inherent errors can be minimized by obtaining better data,
by correcting obvious errors in the data, and by using computing aids of
higher precision.

1.5.2 Round-off errors


Round-off errors occur when a fixed number of digits are used to represent
exact numbers. Since the numbers are stored at every stage of
computation, round-off error is introduced at the end of every arithmetic
operation. Consequently, even though an individual round-off error could be
very small, the cumulative effect of a series of computations can be very
significant.

1.5.3 Truncation errors


These are errors caused by using approximate formulae, which are
generally based on truncated series.
Example 3: We have

x2

3 4 5
ex = 1 + x + + x  x  x  ....... If we use an approximate
2! 3! 4! 5!

formula by truncating the 4th and higher degree terms, we have,


2 3
S(x) = 1 + x + x  x .
2! 3!

Computer Oriented Numerical Methods Page No.: 5


Errors in Numerical Calculations Unit 1

The truncation error (in using the approximate formula S(x)) is

 . . . . . . . .
x4 x5
ex – S(x) = 
4! 5!

1.6 Absolute, Relative and Percentage errors


Absolute error is the numerical difference between its true value of a
quantity and its approximate value. If X is the true quantity and Xa is its
approximate value then the absolute error Ea is given by
Ea = True value _ Approximate value  X _ Xa .

The relative error is the absolute error divided by the true value of the
quantity and this is denoted by Er ,

Absolute error Ea
Relative error Er = 
True value X

and the percentage error Ep is given by

Ep = Ea  100 = Er  100.
X
Let X be a number such that X _ Xa  X, then X is an upper limit on

the magnitude of absolute error and is said to measure absolute accuracy.

Similarly the quantity X ~


X measures the relative accuracy.
X Xa

Obs. 1. The relative and percentage errors are independent of the units
used while absolute error is expressed in terms of these units.

Obs. 2. If the number X is rounded to N decimal places, then

X = 1  10N , where X is the absolute accuracy.


2

Computer Oriented Numerical Methods Page No.: 6


Errors in Numerical Calculations Unit 1

Example 4: If the number X = 0.51 and is correct to two decimal places,

then X = 1  102 = 0.005


2

and the relative accuracy is X  0.005 ~ 0.98


X 0.51

2
Example 5: If is approximated by 0.667, find the absolute and relative
3
errors.

Solution:
Absolute error Ea = True value – Approximate value

2 2  2.01 1
=  0.667    103
3 3 3

Absolute error
Relative error Er =
True value

1
(  10 3 )
3 1
=   103
2/3 2

1.7 Summary
We summarize the concept of significant digits and its relation to accuracy.
Various types of errors, viz. inherent errors, round-off errors, truncation
errors, absolute errors, relative errors and percentage errors are also
discussed.

Computer Oriented Numerical Methods Page No.: 7


Errors in Numerical Calculations Unit 1

1.8 Exercises
1. Round-off the following numbers to 4 significant digits.
38.46325, 0.700292, 0.0022431, 19.235101, 2.36425.
2. Find the percentage error if 625.483 is approximated to 3 significant
digits.
(Ans. 0.0772)
3. The number 2.45789 is rounded-off to five significant figures. Find the
relative and percentage error.
(Ans. 4.069  10–6, 4.069 10– 4)
4. Find the sum of 0.123  103 and 0.456  102 and write the result in three
significant digits.
(Ans. 0.169  103)

5. Calculate the value of 102  101 . Correct to four significant digits.


(Ans. 0.04963)

Computer Oriented Numerical Methods Page No.: 8

You might also like