ESO 208A: Computational
Methods in Engineering
Arghya Das
Department of Civil Engineering
IIT Kanpur
Copyright clause
“The instructor of this course owns the copyright of all the course materials.
This lecture material was distributed only to the students attending the course
ESO208A: Computational Methods in Engineering of IIT Kanpur, and should
not be distributed in print or through electronic media without the consent of
the instructor. Students can make their own copies of the course materials for
their use
Acknowledgement
Profs. Abhas Singh and Shivam Tripathi (CE)
Errors and Error Analysis
Accuracy, Precision what are they?
Accuracy:
how closely a computed or measured value agrees with the True
value
opposite sense: inaccuracy (or bias)
Precision (or reproducible):
How closely individual computed or measured values agree with
each other
Opposite sense: imprecise (or uncertain)
How computer represent number?
Integer:
0, 1, 2, (unsigned) and -1, -2 (signed)
Fixed point:
Floating point:
In general computers use floating point system
Floating point representation of a number =
σ contains the sign of a number (+1, -1)
m = mantissa; 1/b ≤ m < 1
b = base; 2 for binary, 10 for decimal, 16 for hexadecimal
(set of rationals)
Storage of floating point number
Sign (bit) Exponent mantissa
(bit) (bit)
16 bit 1 5 10
32 bit 1 8 23
64 bit 1 11 52
The Significant digits in a number are the digits of the number which
can be used with confidence
Number Significant Rule
digits
228.18 5 All non-zero digits are significant
10.08 4 Zeros between non-zero digits are significant.
0034.5 3 Leading zeros are not significant.
34.500 5 In a decimal number trailing zeros are
significant.
34500 3 or 4 or 5 In a non-decimal number trailing zeros may or
may not be significant
3.450 x 104 4 No ambiguity in scientific notation
Definition of Error:
True Value (a) = Approximate Value + Error (ε)
Absolute Error:
Relative Error:
Relative error is often expressed as (%) by multiplying (e) with 100.
Absolute error can have sign as well as | . |
If the error is computed with respect to the true value (if known), a
prefix ‘True’ is added.
For an iterative process, the true value ‘a’ is replaced with the
previous iteration value and a prefix ‘approximate’ is added. This is
used for testing convergence of the iterative process.
Sources of Error in computation?
Model error: simplifying model assumptions
Errors in the Input data: initial and boundary conditions, measured
values of the parameters and constants in the model
Round-off error: irrational numbers, product and division of two
numbers, limited by the machine capability
Truncation error: truncation of an infinite series, often arises in the
design of the numerical method through approximation of the
mathematical problem.
Round-off Error:
= 1.235734
If the degree of precision limit of a computer is 4 significant
digit in decimal system, the approximate value would be
= 1.235 Chop-off error = 0.000734
= 1.236 Round-off error = - 0.000266
Any quantity falling within an interval of , will be represented
as the nearest allowable number due to round-off, and the upper
error bound is
On the other hand in chopping the upper error bound is
Round-off Error:
For a machine if is the significant digit, in floating point
representation the relative bound is
Chop-off
Round-off
is known as Machine Epsilon
Truncation Error:
- error committed when a limiting process is truncated before one
has reached the limiting value
- e.g. )Δ
→
- Taylor series expansion of a function
Truncation Error: