Professional Documents
Culture Documents
Chapter 1 Sources of Error
Chapter 1 Sources of Error
1.1.Sources of errors
Error is uncertainty that may be present in the solution to a problem. It is the difference between
a true (exact) value and an estimate (approximate) value. Errors are inevitable in the subject of
numerical analysis. It is largely preoccupied with understanding and controlling errors of various
kinds.
i. Inaccurate representation of numbers: Such errors arise due to the intrinsic limitation
of the finite precision representation of numbers (except for a restricted set of
integers) in computers. Computer memory has a finite capacity.
ii. The arithmetic performed in a computing machine (computer, scientific calculator,…)
iii. Using approximate formulae
iv. Originally in stating the problem
1.2.Approximations of errors
There are two kinds of numbers, exact and approximate. Examples of exact numbers are
Note: Significant figure is the number of digits used to express a number. For example the
number of significant figures in the numbers 3.14, 0.00046, 5.0600, 10.246, 2500 are three, two,
three, five, uncertain respectively.
The digits 1, 2, 3, 4, 5, 6, 7, 8, 9 are significant digits. ‘0’ is also a significant figure except when
it is used to fix the decimal point or to fill the places of unknown or discarded digits.
Sometimes the term significant figures refer to the number of important single digits (0 through 9
inclusive) in the coefficient of an expression in scientific notation . The number of significant
figures in an expression indicates the confidence or precision with which an engineer or scientist
states a quantity.
( ) { }
Or
( ) { }
The mantissas do not all have the same significance because they represent different powers of
10. Thus we say that is the most significant digit, and the significance of the digits diminishes
from left to right.
To represent any real number on the computer, we associate to a floating point representation
( ) of a form similar to that of , but with only digits, so
( ) ( )
If , it is significant figure/digit.
If , it is significant figure/digit.
b) ( )
, (rounding up)
A computer can only represent a number approximately in decimal or scientific notation. For
example, a number like may be represented as 0.333333 on a PC to six significant figures.
To round-off the number to significant figures, discard all digits to the right of th decimal
digit and if this discarded number is
(1) Less than 5 in ( )th place, leave the th decimal digit unaltered e.g., 8.893 to 8.89.
(chopping/round down)
(2) Greater than 5 in ( )th place, increase the th decimal digit by unity e.g., 5.3456
to 5.346. (round up)
(3) Exactly 5 in ( )th place, increase the th decimal digit by unity if it is odd
otherwise leave it unchanged. e.g., 11.675 to 11.68, 11.685 to 11.68.
The round-off error is the quantity, which arises from the process of rounding off numbers. The
round-off error can be reduced by carrying the computation to more significant figures at each
step of computation.
Inherent error: is that quantity which is already present in the statement of the problem before its
solution. The inherent error arises either due to the simplified assumptions in the mathematical
formulation of the problem or due to the errors in the physical measurements of the parameters
of the problem. Inherent error can be minimized by obtaining better data, by using high precision
computing aids and by correcting obvious errors in the data.
Without any further details it should already be clear that representing by ( ) necessarily
causes an error. A central question is how accurate the floating point representation of the real
numbers is. Specifically, we ask how large the relative error, defined below, in such a
representation can be.
Absolute error: is the numerical difference between the true value of a quantity and its
approximate value. Thus if is the approximate value of quantity then the absolute error is
denoted and given by
| |
| |
b) Suppose that , then use rounding off to five significant figures for calculating
Solution: (a)
| | | |
| |
| | | |
| |
exercise
(b)
| | | |
| |
| | | |
| |
̅ ̅
̅ ̅
̅ ̅
Note: that as a measure of accuracy, the absolute error can be misleading and the
relative/percentage error is more meaningful, because the relative error takes into consideration
the size of the value.
1.5.Propagations of error
A numerical process is unstable if small errors made at one stage of the process are magnified
and propagated in subsequent stages and seriously degrades the accuracy of the overall
calculation. Whether a process is stable or unstable should be decided on the basis of relative
error.
( ) ( )
( ) ( )
Here, two different but mathematically equivalent methods (associativity) for evaluating the
same expression may lead to different results if floating-point arithmetic is used.
For numerical purposes it is therefore important to distinguish between different evaluation
schemes even if they are mathematically equivalent. Thus we call a finite sequence of
elementary operations (as given for instance by consecutive computer instructions) which pre-
scribes how to calculate the solution of a problem from given input data, an algorithm.
1.6.Instability
Or if an algorithm satisfies a property that, small changes in the initial data produce
correspondingly small changes in the final results, then is called stable; otherwise it is unstable.
Some algorithms are stable only for certain choices of initial data, and are called conditionally
stable. We will characterize the stability properties of algorithms whenever possible.