0% found this document useful (0 votes)
13 views33 pages

Error Analysis in Numerical Computation

The document discusses error analysis and computer arithmetic, focusing on numerical analysis principles, types of errors, and number storage in computers. It covers binary machine numbers, floating-point representation standards, and the implications of finite-digit arithmetic. Additionally, it highlights the importance of understanding absolute and relative errors in numerical computations.

Uploaded by

Mrvn Ssn
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views33 pages

Error Analysis in Numerical Computation

The document discusses error analysis and computer arithmetic, focusing on numerical analysis principles, types of errors, and number storage in computers. It covers binary machine numbers, floating-point representation standards, and the implications of finite-digit arithmetic. Additionally, it highlights the importance of understanding absolute and relative errors in numerical computations.

Uploaded by

Mrvn Ssn
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

JOSEL L.

DIZON, MAEd-Math
ERROR ANALYSIS
AND
COMPUTER
ARITHMETIC
Week 2
Desired Learning Outcomes
• 1) list the basic principles of numerical analysis,
• (2) identify different possible types of errors in
numerical computation,
• (3) describe how numbers are stored in computer and
its relation to numerical analysis.
ERROR ANALYSIS
AND
COMPUTER ARITHMETIC
• Floating point arithmetic
• Error
• Accuracy
• Convergence of solutions
BINARY MACHINE NUMBERS
In 1985, the IEEE (Institute for Electrical and Electronic
Engineers) published a report called Binary Floating
Point Arithmetic Standard 754–1985. An updated version
was published in 2008 as IEEE 754-2008. This provides
standards for binary and decimal floating point numbers,
formats for data interchange, algorithms for rounding
arithmetic operations, and for the handling of exceptions.
Formats are specified for single, double, and extended
precisions, and these standards are generally followed by
all microcomputer manufacturers using floating-point
hardware.
BINARY NUMBER SYSTEM
• Positional numeral system employing 2 as
the base and so requiring only two different
symbols for its digits, 0 and 1, instead of the usual
10 different symbols needed in
the decimal system.
BINARY - - > DECIMAL

27 26 25 24 23 22 21 20

= 25 + 24 + 22 + 21
= 32 + 16 +4 +2
= 54
Fixed Point Numbers
8 – Bit Fixed Point
Limitations of Fixed Point
BINARY MACHINE NUMBERS
In 32-bit single-precision floating-point representation:
•The most significant bit is the sign bit, with 0 for positive
numbers and 1 for negative numbers.
•The following 8 bits represent exponent.
•The remaining 23 bits represents fraction.
BINARY MACHINE NUMBERS
A 64-bit (binary digit) representation is
used for a real number. The first bit is a
sign indicator, denoted s. This is followed
by an 11-bit exponent, c, called the
characteristic, and a 52-bit binary
fraction, f , called the mantissa. The
base for the exponent is 2.
BINARY MACHINE NUMBERS
To save storage and provide a unique
representation for each floating-point number,
a normalization is imposed. Using this system
gives a floating-point number of the form

(−1)𝑠 (2)𝑐−1023 (1 + f ).
Example
Consider the machine number
0 10000000011 1011100100010000000000000000000000000000000000000000.

The leftmost bit is s = 0, which indicates that the number


is positive. The next 11 bits, 10000000011, give the
characteristic and are equivalent to the decimal number
DECIMAL MACHINE NUMBERS
The use of binary digits tends to conceal the
computational difficulties that occur when a finite
collection of machine numbers is used to represent all
the real numbers. To examine these problems, we will
use more familiar decimal numbers instead of binary
representation. Specifically, we assume that machine
numbers are represented in the normalized decimal
floating-point form

for each i = 2, . . . , k. Numbers of this form are called k-digit


decimal machine numbers.
The error may results from replacing a
number with its floating-point form is
called round-off error regardless of
whether the rounding or chopping method
is used.
Example
ABSOLUTE ERROR
AND RELATIVE ERROR

The relative error is generally a better measure of accuracy than


the absolute error because it takes into consideration the size of
the number being approximated.
Consider the absolute and relative errors in representing p by p∗ in the following
example.
FINITE-DIGIT ARITHMETIC
In addition to inaccurate representation of numbers, the arithmetic
performed in a computer is not exact. The arithmetic involves
manipulating binary digits by various shifting, or logical, operations. Since
the actual mechanics of these operations are not pertinent to this
presentation, we shall devise our own approximation to computer
arithmetic. Although our arithmetic will not give the exact picture, it
suffices to explain the problems that occur. (For an explanation of the
manipulations actually involved, the reader is urged to consult more
technically oriented computer science texts, such as [Ma], Computer
System Architecture.)
which gives 4.5558. Implementing finite-digit chopping arithmetic is
more difficult and requires a sequence of steps or a procedure.
EXAMPLE
LISTS THE VALUES OF THIS AND THE
OTHER CALCULATIONS

The maximum relative error for the operations is 0.267 × 10−4 , so the
arithmetic produces satisfactory five-digit results
Thank you

You might also like