0% found this document useful (0 votes)
68 views

Numerical Methods c1/10

Errors are introduced in numeric calculations due to approximate representations of numbers. There are inherent errors from finite precision and method errors from the calculation process. Absolute error is the difference between approximate and exact values, while relative error is the absolute error divided by the approximate value. Lipschitz functions have stable values under small errors. Rounding errors occur when numbers are represented in a calculator's finite memory using normalized floating-point format.

Uploaded by

Iustin Cristian
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views

Numerical Methods c1/10

Errors are introduced in numeric calculations due to approximate representations of numbers. There are inherent errors from finite precision and method errors from the calculation process. Absolute error is the difference between approximate and exact values, while relative error is the absolute error divided by the approximate value. Lipschitz functions have stable values under small errors. Rounding errors occur when numbers are represented in a calculator's finite memory using normalized floating-point format.

Uploaded by

Iustin Cristian
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

Course 1

CHAPTER 1 .APPROXIMATE NUMBERS


ERRORS IN NUMERIC CALCULUS
In every problem of processing physical data and of numeric calculus it is worked with
approximate representations and more, the numeric calculus leads usually to approximate
solutions and not to accurate mathematic solutions. In some cases the errors can be estimated
and even decreased, but in other cases the errors can be unknown, and thus it is lost the trust
in the final result.
A calculus method is efficient when the precision of the numeric calculus is good, that
means the numeric result we get is affected by a very small error.
Errors may occur due to the necessity of representation of numbers by a finite number of
figures. Representation errors exist due to the fact that a calculator works only with some
rational numbers in some determinate time. All these errors are called inherent or initial
errors and cannot be influenced by the calculus method (errors in data).
Examples:
3,14
or
3,14159

2, 718 e
or
2, 71828 e
2 1, 41 or 2 1, 4142

A physical measure (like distance or time) cannot be accurate, thus results the measure
error.
Transcendental numbers (numbers that cannot be the roots of a polynominal with
rational coefficient) and irrational dont have a finite representation in any numeric basis.
Rational numbers, according to the numeric basis, can or cannot have a finite representation.
By using a numeric method in solving a problem it is introduced another type of error,
the so-called the error method, which can be influenced in the way of decreasing by choosing
the most adequate method.
In the process of calculus may occur distortion errors and rounding errors which are
called calculus errors.
*Distortion errors belong to the category of errors called approximate errors and occur, for
example, by the restraint from a series of a finite number of terms
2 4 6
cos 1 ...
2! 4! 6!
x x x
x + +
the gap terms , which makes the rest of the series, are in an infinite number and introduce an
error in the searched result, a distortion error, which depends on the number of terms held in
calculus which cannot be exactly calculated but it can be estimated. The representation of 1/3
under the form of 0,333 implies a distortion error of approximately
4
10 3

.
*The round methods are given by the limited capacity of the calculator to memorize numbers.
This error can be diminished by the growth of the memory space necessary for the
registration of the numeric variables. During the data analysis or the numeric calculus it can
be assured a memory space of the variables big enough for the rounding errors not exceeding
a certain maximum value, any calculator cannot represent but a finite multitude representation
of numbers.
As given the set { }
1 2
, ,...,
N
A a a a
with
1 2
...
N
a a a < < <
for example the arithmetical average
between
i
a
and
1 + i
a
gets us out from the set A. That is why the calculators use the round
function which associate each real number between
1
a
si
N
a
to the closest element from the
set A.
[ ]
1
: ,
N
rd a a A
( round function),
1
1
1 1
, ,
2
( )
, ,
2
i i
i i
i i
i i
a a
a x a
rd x
a a
a x a
+
+
+ +
+ _

'
+
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

of the approximate number a regarding the exact


mathematic value A is given by the formaula
a
A a
, sometimes called abolute limit
error in the situation in which we have equality in the anterior relation and we may write
a
A a t
.

Definition 3: It is called the relative error
a
r
of an approximate number a the
a
a
A a
r
a a


, with 0 a from which we can deduce the relation
(1 )
a
A a r t
.
Observations: 1) If we know a and A the error calculus is immediate. Usually it is known
only the approximation a.
2) Sometimes, the relative error can be defined as the ratio
a
a
r
A

, but it is preferred the


relative error calculus as in definition 3 because most of the times, it is not known the exact
mathematic value A.
Example: 1)
3,14 a
si A , we have
3,14 0, 01
a
A a <
,
0, 003
a
a
r
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.

You might also like