Documente Academic
Documente Profesional
Documente Cultură
For reading
Reference
Chapra
Chapter
3
Page
52-77
Objectives
Numerical errors
Numerical methods generate:
approximate solutions that are close to the exact
solutions (analytical solutions).
Exact numerical errors are difficult to be computed:
a) Given input data from measurements are not
exact
, e, or 7
3.14159265...
Lets say
49Km/h is exact.
Read the meter 10
times.
48.9
49.0
49.8
.
.
.
5.38
5.380
5.3800
Zeros are sometimes used to locate the decimal point not significant
figures.
0.00001753
0.0001753
0.001753
37.
37000
7
5.38 x 104
5.380 x 104
5.3800x 104
Zeros are sometimes used to locate the decimal point not significant
figures.
0.00001753
0.0001753
0.001753
Definition of errors
Example 3.1 (Textbook): Measuring the lengths of a
bridge and a rivet
True length of the bridge: 10,000cm
Measured length: 9999cm
Approximat e error
a
100%
Approximat ion
Iterative approach to find a solution, example
Newtons method
11
Tolerance
Stopping Criterion:
s (0.5 10
(2 -n)
)%
12
x
x
x
e 1 x
2 3
n!
x
13
s (0.5 10
(2 -n)
)%
14
Errors: Round-off
Representation of numbers by computer:
Numbers then can be expressed by a finite
number of significant digits
, e, or 7
3.14159265...
15
Binary numbers
10-base numbers are mostly used for mathematical operations.
16
Binary numbers
10-base numbers are mostly used for mathematical operations.
1563=(1x103)+(5x102)+(6x101)+(3x10o)
2-base
m.be
mantissa
0.1 m<1
0.5 m<1
18
+/-
21
20
2-1
2-2
2-3
10-BASE
0.062500
0.078125
0.01562
5
0.093750
(e=-3)
0.109375
0.125000
0.156250
0.187500
0.218750
Gap (interval)
x
Smallest
0.015625
0.03125
(e=-2)
Largest
20
Floati
Floating-point
(machine number) for real numbers
21
Example:
p=3.14159265358 to be stored on a base-10 system
carrying 7 significant digits.
p=3.141592 chopping error
t=0.00000065
p=3.141593 rounded
t=0.00000035
22
Machine epsilon
The interval (x) increases as x ( the numbers in
magnitude) increases. This means the quantizing errors
are proportional to the magnitude of the numbers.
For chopping
For rounding
Summary
Machine epsilon
x
x
24