Lecture 2
Lecture 2
Numerical Analysis
MEASURING ERRORS
True • 1,1/2
Number
Fixed point
number
Floating point
number
FIXED POINT REPRESENTATION
The fixed-point notation range is very less as can only represent the
number in a set limit.
Scientific notation
Normalized
notation
SCIENTIFIC NOTATION
7.28
0.0089
WHAT ARE
SIGNIFICANT DIGITS?
30
HTTP://NUMERICALMETHODS.ENG.USF.EDU
WHY ERROR ARISES?
Errors arises due to approximate calculation procedures.
HOW TO DEAL WITH
ERRORS?
To deal with errors we need to perform 3 steps:
1. Identify Errors
2. Quantify Errors
3. Minimize Errors
HOW TO QUANTIFY Lets start Learning
ERRORS?
ERROR
Error is defined as the difference between the true and the
approximate values.
Also called as True error.
TRUE ERROR
Defined as the difference between the
true value in a calculation and the
approximate value found using a
numerical method etc.
True Error =
True Value – Approximate Value
35
HTTP://NUMERICALMETHODS.ENG.USF.EDU
EXAMPLE
Gravitation force g has true value 9.8 m/s2 but some times
approximated as 10 m/s2
What is error here?
EXAMPLE
Gravitation force g has true value 9.8 m/s2 but some times
approximated as 10 m/s2
What is error here?
Et=9.8-10=-0.2
ANOTHER EXAMPLE—
TRUE ERROR
The derivative, of a function can be
approximated by the equation,
If and
a) Find the approximate value of
b) True value of
c) True error for part (a)
38
HTTP://NUMERICALMETHODS.ENG.USF.EDU
EXAMPLE (CONT.)
Solution:
a) For and
39
HTTP://NUMERICALMETHODS.ENG.USF.EDU
EXAMPLE (CONT.)
Solution:
b) The exact value of can be found by using
our knowledge of differential calculus.
40
HTTP://NUMERICALMETHODS.ENG.USF.EDU
EXAMPLE (CONT.)
c) True error is calculated as
41
HTTP://NUMERICALMETHODS.ENG.USF.EDU
TYPES OF ERRORS
Magnitude of Error does not show how bad the error is as it depends upon
the other factors also. This lead to the definition of Relative error. The
relative error is defined by
True Error
Relative True Error ( )=
True Value
49
HTTP://NUMERICALMETHODS.ENG.USF.EDU
EXAMPLE-RELATIVE
ERROR
For the previous example for true error,
find the relative and percentage error for
at
with
x 100
=7.588%
50
HTTP://NUMERICALMETHODS.ENG.USF.EDU
APPROXIMATE ERROR
What can be done if true values are not known or are very
difficult to obtain?
Approximate error is defined as the difference between the
present approximation and the previous approximation.
51
HTTP://NUMERICALMETHODS.ENG.USF.EDU
EXAMPLE—
APPROXIMATE ERROR
For at find the following,
a) using
b) using
c) approximate error for the value of for part b)
52
HTTP://NUMERICALMETHODS.ENG.USF.EDU
EXAMPLE (CONT.)
Solution: (cont.)
b) For and
54
HTTP://NUMERICALMETHODS.ENG.USF.EDU
EXAMPLE (CONT.)
Solution: (cont.)
55
HTTP://NUMERICALMETHODS.ENG.USF.EDU
LETS FIND
SOLUTION
Thanks!