Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 25

Errors In Numerical Computation

Introduction
• Numerical computing is an interconnected combination of
computer science and mathematics in which we develop and
analyze algorithms for solving important problems in science,
engineering, medicine, and business.
• Numerical methods are mathematical techniques used for solving
mathematical problems that cannot be solved or are difficult to
solve
• In the world of math, numerical method is well known for focusing
on the algorithms used to solve issues in continuous math
• The numerical solution is an approximate numerical value for the
solution. Although numerical solutions are an approximation, they
can be very accurate
Error
• Part of the application of numerical analysis
involves the use of errors.
• When using numerical methods or algorithms
and computing with finite precision, errors of
approximation or rounding and truncation are
introduced.
Sources of Errors
• There are three major sources of error in
computation:
– human errors
– truncation errors
– round-of errors.
Computer Representation Of Numbers

• The number base used in computers is seldom


decimal.
• Most digital computers use the base 2 (binary)
number system or some variant of it such as
base 16 (hexadecimal)
Binary System
Decimal
• System:

Or, with is a natural number consisting of n + 1 digits, then

Binary system:
– each digit represents an increasing power of 2

With ,
Fraction in Binary
•• Fractions in binary arithmetic terminate only if 2 is the only
prime factor in the denominator
• Suppose is a real number, and

Then
• Example:
Fraction In Binary

Hexadecimal System
•• The hexadecimal numeral system, often shortened to "hex", is
a numeral system made up of 16 symbols (base 16)
• The standard numeral system is called decimal (base 10) and
uses ten symbols: 0,1,2,3,4,5,6,7,8,9
• Hexadecimal uses the decimal numbers and six extra symbols
• There are no numerical symbols that represent values greater
than ten, so letters taken from the English alphabet are used,
specifically A, B, C, D, E and F

Example
Conversion
Hexadecimal
• to Binary

Binary to Hexadecimal
Scientific Notation
•• Scientific notation is a way of writing very large or very small
numbers
• A number is written in scientific notation when a number between
1 and 10 is multiplied by a power of 10

where 1 ≤ |q| < 10.


• q is a number with one non-zero digit to the left of the decimal
point and it can be positive or negative. The number q is called the
mantissa and the number n is called the exponent.
• Example:
1.
Normalized Floating-Point
• Decimal Floating Point Number

Where and is exponent


Example:
Normalized Floating-Point
• Binary Floating Point Number

Where and is exponent


Example:

1.
Error Analysis
• Let is the exact value of some number and is
its approximation.
• we call error
• , we call absolute error
• , we call relative error

• Percent error is
Error Analysis
• Example:
Error Analysis
•• Example:
1. and

2. and

3. and
Significant Digits
• Non-zero digits are always significant
Example: 25.047 has 5 significant digits
• Any zeros between two significant digits are significant
Example: 0.100068 has 6 significant digits
• Zeros before the decimal point are placeholders and not significant
Example: 0.000068 has 2 significant digits (6 and 8 are
significant)
• Zeros after the decimal point and after figures are significant
Example: -0.00250 has 3 significant digits (2,5,and 0 are
significant)
• Exponential digits in scientific notation are not significant
Example: 1.12 x 106 has 3 significant digits (1,1, and 2 are
significant)
Round-off Error
• Roundoff errors occur because computers have a limited
ability to represent numbers

• For rounding, when dk+1 ≥ 5, we add 1 to dk; that is, we


round up.
• When dk+1 < 5, we simply chop off all but the first k
digits; so we round down.
• Example:
– 2.324 2.32
– 2.316 2.32
– 2.316 2.32
Truncation Error
• truncation error is the error made by
truncating an infinite sum and approximating
it by a finite sum.
• Example:
... Convergent to 1

Truncation error =
Truncation Error
• Example:
Chopping Error

• Example:
Error Propagation
• The propagation of errors in individual
mathematical operations, such as addition,
multiplication, raising numbers to powers, etc.
can be determined with specific analytical
formulas
• Example (addition):
Error Propagation
• Example (reduction):
Error Propagation
• Example (multiplication):

and
Thank You..

You might also like