You are on page 1of 9

NUMERICAL ANALYSIS

Lecture -1

Dr. Muhammad Rafiq


Associate Professor
University of Central Punjab
Lahore Pakistan

Page 1 of 9
INTRODUCTION TO NUMERICAL ANALYSIS

Numerical analysis is the study of appropriate algorithms for


solving problems of mathematical analysis by means of
arithmetic calculations.
When a mathematical problem can be solved analytically, its
solution may be exact but more frequently, there may not be a
known method of obtaining its solution e.g. it is rather difficult
to solve the following transcendental equation analytically i.e
acos2x + b ex+ c=0
Many more such examples can be sighted for which solution
by analytical mean are either impossible are so complex that
they are quite unsuitable for practical purposes. In this situation
Page 2 of 9
the only way of obtaining solution is to approximate the
problem in such a manner that the original problem may reduce
to repetition of same step or series of steps so that the
computations become automatic. Such a process is called
“Numerical Method” and the derivation and analysis of such
methods lies within the discipline of Numerical Analysis. Thus
the subject of numerical analysis is concerned with derivation,
analysis and implementation of methods for obtaining reliable
numerical answers to complex mathematical problems.
Numerical methods provide estimates that are very close to
exact solution obviously an error is introduced into the
computations. Here error means the difference between exact
and approximate (computed) values.

Page 3 of 9
Floating point number system:
In the decimal notation every real number is represented by a
finite or infinite sequence of decimal digits. For machine
computation, the number must be replaced by number of finitely
many digits. Most digital computers have two ways of
representing numbers called fixed point & floating points.

Fixed point representation:

In a fixed point system all numbers are given with a fixed


number of decimal places.
For Example
62.358, 1.000, 0.013 etc
Page 4 of 9
Fixed point representations are impractical in most scientific
computations and will not concern us.

Floating point representation:

In floating point system number of significant digits kept fixed


where as decimal point is floating as seen from the exponent.
For Example

0.6238×103 ⟹ 6.238 × 102


0.1714×10-13 ⟹ 1.714 × 10-14

Page 5 of 9
Significant digits:
Significant digit of a number is any given digit of the number
except possibly for 0’s to the left of 1st non zero digit that serves
only to the fix the position of decimal point.
For Example
Each number 1360, 1.360, 0.001360 has 4 significant digits.
Theoretically we can represent any non zero number as
a = ± m×10e ; 0.1 ≤ m< 1 , e∈ 𝑍
On computer ‘m’ is limited to‘t’ digits only and ‘e’ is also
limited 𝑎̅ = ± 𝑚 ̅ × 10𝑒 𝑚 = 0. 𝑑1 . 𝑑2 . . . . . 𝑑𝑛 , 𝑑1 > 0
|𝑒| < 𝑀 ie. [−𝑀 < 𝑒 < 𝑀]
The fractional part is called Mantissa and ‘𝑒’ is called Exponent.
Page 6 of 9
Under Flow and Over Flow:

The range of exponents, that a typical computer can handle is


very large . The IEEE floating point standard for single
precision is about
-38<e<38
And for double precision it is about
-308<e<308
If in a computation a number outside this range occurs, this is
called under flow when the number is smaller and overflow if it
is larger. In case of under flow, the result is usually set to zero

Page 7 of 9
and computations continue. Over flow causes the computer to
halt. Standard codes are written to avoid over flows.

Round-off and Chopping:

Number Rounding Chopping


3.1417 3.142 3.141
4.323 4.32 4.32
4.335 4.34 4.33

NOTE:
An error introduced by rounding or chopping is always
referred to as round-off error (rounding error) regardless
whether we chopp or round.

Page 8 of 9
EXERCISE
Q1:
Write 23.49, -302.867, 0.000527532, -25700 in a floating
point, form rounded to 4S (4 Significant Digit)
Q2:
Write -89.216618, 500 000, 0.002213675 in floating point,
form rounded to 5S (5 Significant Digit)
Q3:
−0.81534
Compute by rounding stepwise to 4S, 3S and
35.724 −35.596
2S whereas ‘stepwise’ means round the rounded numbers, not
the given ones. What conclusion you draw.

Page 9 of 9

You might also like