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

Advanced Database

This document provides an overview of numerical analysis and discusses sources of errors, propagation of errors, and rules for determining significant digits in calculations. It defines rounding and truncation errors that occur in numerical computations and analyses how small errors at each step can accumulate. Formulas are given for calculating absolute and relative error. Exercises with examples of rounding and truncating numbers are also provided.

Uploaded by

suplexcity656
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Advanced Database

This document provides an overview of numerical analysis and discusses sources of errors, propagation of errors, and rules for determining significant digits in calculations. It defines rounding and truncation errors that occur in numerical computations and analyses how small errors at each step can accumulate. Formulas are given for calculating absolute and relative error. Exercises with examples of rounding and truncating numbers are also provided.

Uploaded by

suplexcity656
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

St.

Marys University

Faculity of Informatics

Numerical analysis short note

Chapter 1

Overview

Numerical Analysis is the branch of mathematics that provides tools and methods

for solving mathematical problems in numerical form. The overall goal of the field of
numerical analysis is the design and analysis of techniques to give approximate but
near to accurate solutions to hard problems i.e problems that cannot be solved using
analytical method.

Errors
Occurrence of error is unavoidable in the field of scientific computing. In- stead, numerical
analysts try to investigate the possible and best ways to minimise the error. The study of the error
and how to estimate and minimise it are the fundamental issues in error analysis

Sources of Errors

The main sources of errors in numerical computation are rounding-off, data uncertainty,
and truncation.

Round-off Errors:

Round-off error occurs because computers use fixed number of bits and hence fixed
number of binary digits to represent numbers. When the number of bits required for
representing a number is less than the number is usually rounded to fit the available
number of bits. This is done either by chopping or by symmetric rounding.

There are also the irrational numbers such as , which do not terminate. In order to
carry out a numerical calculation involving such numbers, one must approximate them
by a representation involving a finite number of significant digits (sd).

To five significant digits (5S ), 2/3 is represented by 0.66667,  by 3.1416, and by


1.4142. None of these are exact representations, but all are correct to within half a unit
of the fifth significant digit. Numbers should normally be presented in this sense,
correct to the number of digits given.

Chopping: Rounding a number by chopping amounts to dropping the extra digits. Here
the given number is truncated. Suppose that we are using a computer with a fixed word
length of four digits. Then the truncated representation of the number will be . The
digits will be dropped. Now to evaluate the error due to chopping let us consider the
normalized representation of the given number
Uncertainty in the data is always a possibility when we are solving practical problems. It
may arise in several ways: from errors in measuring physical quantities, from errors in
storing the data on the computer (rounding errors), or, if the data is itself the solution to
another problem, it may be the result of errors in an earlier computation. The effects of
errors in the data are generally easier to understand than the effects of rounding errors
committed during a computation, because data errors can be analyzed using perturbation
theory for the problem at hand, while intermediate rounding errors require an analysis
specific to the given method.

Truncation Errors:

Often an approximation is used in place of an exact mathematical procedure. For instance


consider the Taylor series expansion of say i.e.

3 5
x x
Sinx ≃ x- +
3! 5!
Significant Digit Rules

How do we determine the number of significant digits in a number such as 0.23 g or 1.20 ?
In order to determine the number of significant digits there are several rules we can use.

Rule One: All Non-Zero Digits Are Significant

Non-zero digits are any digits other than zero. According to this rule, any digits in a
number that are not zero are significant. Let's look at a few examples:

Example Number of Significant Digits


1.2 2
122 3
1659 4
129.3 4
129.234 6

Here we can see any digit that is a non-zero digit is considered significant. This is true
both in the presence or absence of a decimal.

Rule Two: Zeros That Appear Between Non-Zero Digits Are Always Significant

According to this rule, any zeros in between non-zero digits are significant. Let's look at a
few examples:

Example Number of Significant Digits


1.02 3
1022 4
160059 6
1209.3 5
129.23004 8

Here we can see any digit that is non-zero is considered significant (Rule 1). The zeros
between the non-zero numbers are also significant. This is true both in the presence or
absence of a decimal.

Rule Three: Zeros Before A Decimal Point That Precede Non-Zero Digits Are Not
Significant

According to this rule, zeros before a decimal point are not significant when they come
before a non-zero number. Let's look at a few examples:

Example Number of Significant Digits


001.02 3
0.01022 4
0125.4 4

In the first example, all non-zero digits are significant (Rule 1). The zeros between the
non-zero numbers are significant (Rule 2). The zeros before the decimal point preceding
the non-zero digits are not significant (Rule3).

In the second example (0.01022) there are 4 significant figures. All non-zero numbers are
significant (Rule 1) and the zero in between the non-zero numbers is also significant
(Rule 2). The zeros before the non-zero numbers are not significant (Rule 3).

Rule Four: Zeros To The Right Of A Decimal After A Non-Zero Number Are
Significant

According to this rule, all zeros after a decimal are significant only when they come
behind a non-zero number. Let's look at some examples:

Example Number of Significant Digits


1.20 3
1.2000 5
0.001 1
0.0010 2

Notice in the last example, only the non-zero number (Rule 1) and the 0 after that number
are considered significant (Rule 4). Rule 3 tells us the zeros before the non-zero number
are not significant.
Absolute and Relative Error

Let x be the exact value and let ~


x be the approximate value

True Error e = x − ~
x

Absolute Error e | = |x −~
x|

~ ¿
Relative Error er = ¿ x− x∨ ¿ x∨¿ ¿ ¿

Example Let x = 3.141592653589793 is the value of the constant ratio π correct


to 15 decimal places and x = 3.14159265 be an approximation of x. Compute the
following quantities:
a. The true error.

b. The absolute error.

c. Relative Error

Solution:

a. The error

e=x−~
x = 3.141592653589793 − 3.14159265 = 3.5897929073769321x10− 09
= 3.589792907376932 × 10−9 = 0.000000003589792907376932.

b. The absolute error

e = |x−~
x | = |3.141592653589793−3.14159265| = 3.589792907376932× 10−9

c. The relative error


e = |x−~ x| = 3.141592653589793 − 3.14159265
3.141592653589793
|x|
3.589792907376932
= × 10−9= 1.142666571770530× 10−9.
3.141592653589793

Propagation of error

It refers to the methods used to determine how the uncertainty in a calculated result is related to the
uncertainties in the individual measurements. The propagation of errors in individual mathematical
operations, such as addition, multiplication, raising numbers to powers, etc. can be determined
with specific analytical formulas. In a numerical computation round-off errors are introduced at
every stage of computation. Hence though an individual round-off error due to a given number at a
given numerical step may be small but the cumulative effect can be significant. This creates
propagation of error.

However, the analysis of the propagation of errors through a model is frequently most easily
accomplished numerically.

There are two types of propagation errors


A. Linear propagation error : applying an algorithm consisting of a sequence of n
elementary operations
En=n x initial error ………….. linear growth
The algorithm that shows a propagation error of linear growth is said to be stable (such
algorithm is acceptable)
B. Exponential growth
If we apply an algorithm consisting of n elementary operations
En =kneinitial where k>1
An error that shows a propagation a propagation error of exponential growth is said to be
unstable. Such type of algorithm should be avoided
EXERCISES

1. How many significant digits does each of the following numbers have?
a. 185000 e. 1.850 × 102
b. 0.0185 f. 1.8500 × 10−2
c. 1.0185 g. 100.00
3
d. 1.85 × 10 h. 100.001

2. Consider the following numbers:


a. 34.78219, c 0.3478219
b. 3.478219 d. 0.03478219
,
I.chop to three decimal places (3sd),
II.round to three significant digits (3sd),
III.round to three decimal places (3sd ).

3. For the number 5/3 = 1.66666...determine the magnitude of the round-off error when it

is represented by a number obtained from the decimal form by:

I. chopping to 3sd,
II. chopping to 3sd,
III. rounding to 3sd
IV. rounding to 3sd.
3. Approximate the following numbers to four digits using rounding and chopping:
1. 1.98876.
2. 33.87654.
3. 8.98879.
4. 2.88778

You might also like