Numerical Methods c1/10
Numerical Methods c1/10
'
+
1
]
Example: Having a representation in a normalized form for three accurate decimal fractions,
rd (0,1234) = 0,1234 and rd(0,1235)=0,124.
Observation: The round function has important effects and the arithmetical operations lose
their usual properties, thus : addition and multiplication are not associative and multiplication
is not distributive regarding the addition.
Example: x=0,1234; y=0,1231; z=0,123
rd(rd(x+y)+z) = rd(rd(0,1234+0,1231)+0,123) = rd(rd(0,2465)+0,123) = rd(0,247+0,123) =
rd(0,370) = 0,370 = 0,37
rd(x+rd(y+z)) = rd(0,1234+rd(0,1231+0,123)) = rd(0,1234+rd(0,2461)) = rd(0,1234+0,246) =
rd(0,3694) = 0,369
It can be noticed that rd(rd(x+y)+z) is different by rd(x+rd(y+z)).
The iteration error is introduced at each step of calculus in an iterative algorithm, based
on a recurrent formula. This error occurs because the approximative solution is used for
calculations in the next steps. Thus the iteration error can be used for the control of the correct
iterative algorithm. A correct iterative algorithm determinates a decrease of iteration error by
each step of calculation and leads to the correct solution. The iteration error can be reduced up
to the limit given by the calculation device.
The total error is made by the inherent error, the method error and the calculation
method and each of them can be expressed under the form of absolute or relative error.
Definition 1: Given a the approximate value of number A, the value result by a
measurement, of a numeric calculus or an observation. If a< A we say that a approximates
number A by lack , and if a > A then the A approximation by a is by addition.
Definition 2: The absolute error
a
.
2)
3,14 a
si
3,141592 A
,
3
3,141592 3,14 0, 001592 1, 592 10
a
A a
,
4
0, 000507 5, 07 10
a
a
A a
r
a a
.
3) 999996 a and 1000000 A we can notice calculi like
a a
r >>
.
4)
0, 000009 a
and
0, 000012 A
we can notice calculi like
a a
r <<
.
Definition 4: Function
R R I f :
has Lipschitz property if
) (
L>0 so that
I y x y x L y f x f , ) ( , ) ( ) (
Observation : If f is a Lipschitz function , then its value determination is stable at errors,
that means small variations of the initial data which lead to small variations of the results.
Example: 1 ) ( , ] 1 , 0 [ :
2
+ + x x x f R f has the Lipschitz property because
] 1 , 0 [ , ) ( , 3 ) ( ) ( y x y x y f x f
If
] 1 , 0 [ x
and y is the approximate value of x with 2 decimal fraction (
2
10
y x
), then:
2 2 2 2
2
( ) ( ) 1 1 ( )( )
( ) ( 1) 1 3 3 10
f x f y x x y y x x y y x y x y x y
x y x y x y x y x y
+ + + + +
+ + + +
Thus the evaluation error of f(x) is at most
2
10 3
. That means that the error does not
depend on the number x but on the precision with which it is known.
Observations:
1) Any Lipschitz function is continuous.
2) The reciprocal of the anterior observation is false because, for example, function
x x f R f ) ( , ] 1 , 0 [ : is a continuous function but does not have the Lipschitz
property.
Definition 5: We define the approximate numbers as the numeric approximative of the
parameters.on base ten an approximate number can be written under the form:
1 1
1 2
10 10 ... 10
m m m n
n
a a a a
+
+ + + ,
1 2
, ,...
n
a a a
being the decimal figures of the
approximate number a.
The nonvoid figures, the void ones included between the nonvoid or those which indicate the
order kept in calculi bear the name of semnificative figures.
Example:
2 3 4 5
3 10 0 10 2 10 1 10 0, 03021 a
+ + +
Has the first two figures of zero and the eventual zeroes from the end as unsemnificative
figures.
The problem of round errors appears if a calculator operates with fractional numbers. In
this case the intern representation of numbers is made under the form called the mobile coma.
A number written in the mobile coma is composed by a fraction called mantissa and an
integer called exponent.
e
N M b ,
where M the mantissa of the number, b- the basis of the numeric system, e the exponent of
the number.
Example:
2
2
64, 35 0, 6435 10
0, 00167 0,167 10
Definition 6: A number represented by the mobile coma is normalized if the first figure
from the mantissa is different from zero.
Observation: In the decimal system
e
N M b si N is normalized if
1
1
10
M < .
Addtion or substraction operations:
1- are brought to the largest exponent
2- mantissas are added
3- it is normalized the mantissa of the sum we get, if necessary.
Example:
3
1
2 3
2
3
1 2
232, 4 0, 2324 10
35, 4 0, 354 10 0, 0354 10
0, 2678 10
N
N
N N
+
Analogous to multiplication the mantissas are multiplied, we normalize, the exponent of
the product is the sum of the exponents.
Any result from the four operations can be decomposed in two parts, thus;
10 10
e e s
R M P
+ ,
where M has S figures in the mantissa of a number represented by the mobile coma,
1
1
10
M < ,
0 1 P <
, because we dont know if P is normalized or not, P may be even
zero, P contains the numbers whic cannot be included in mantissa M.
Rounding M always depends on the value of P. It has to be included the case when P
is totally neglected, then M does not modify in any sense, operation called the cut or the
limitation of the result. This type of rounding induces a bigger error than the usual rule of
rounding.
The maximum relative error appears when P is large and M is small.
Knowing that
1
1
10
M < and
0 1 P <
, then the absolute value of the relative error is
1 1
10 1 10
10 10
10 0,1 10
e s e s
s s R
R e e
P
r
R M
+
,
and does not depend on the size of the numbers but only on the number of figures from the
mantissa.