Chapter 1 / Error in Numerical Method

Slides:



Advertisements
Similar presentations
Part 1 Chapter 4 Roundoff and Truncation Errors PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The McGraw-Hill.
Advertisements

3- 1 Chapter 3 Introduction to Numerical Methods Second-order polynomial equation: analytical solution (closed-form solution): For many types of problems,
Roundoff and truncation errors
2009 Spring Errors & Source of Errors SpringBIL108E Errors in Computing Several causes for malfunction in computer systems. –Hardware fails –Critical.
Taylor’s Theorem Section 9.3a. While it is beautiful that certain functions can be represented exactly by infinite Taylor series, it is the inexact Taylor.
ECIV 201 Computational Methods for Civil Engineers Richard P. Ray, Ph.D., P.E. Error Analysis.
Approximations and Errors
Round-Off and Truncation Errors
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 3 Approximations and Errors.
Part 3 Truncation Errors.
1 Error Analysis Part 1 The Basics. 2 Key Concepts Analytical vs. numerical Methods Representation of floating-point numbers Concept of significant digits.
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 31.
Introduction and Analysis of Error Pertemuan 1
Simple Data Type Representation and conversion of numbers
Binary Real Numbers. Introduction Computers must be able to represent real numbers (numbers w/ fractions) Two different ways:  Fixed-point  Floating-point.
Information Representation (Level ISA3) Floating point numbers.
1 Lecture 5 Floating Point Numbers ITEC 1000 “Introduction to Information Technology”
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI 230 Information Representation: Negative and Floating Point.
Lecture 2 Number Representation and accuracy
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
CISE301_Topic11 CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4:
Introduction to Numerical Analysis I
ES 240: Scientific and Engineering Computation. Chapter 4 Chapter 4: Errors Uchechukwu Ofoegbu Temple University.
ME 142 Engineering Computation I Computer Precision & Round-Off Error.
Round-off Errors.
Round-off Errors and Computer Arithmetic. The arithmetic performed by a calculator or computer is different from the arithmetic in algebra and calculus.
NUMERICAL ERROR Student Notes ENGR 351 Numerical Methods for Engineers Southern Illinois University Carbondale College of Engineering Dr. L.R. Chevalier.
MECN 3500 Inter - Bayamon Lecture 3 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 3.
Lecture 4 - Numerical Errors CVEN 302 June 10, 2002.
Introduction to computing
Numerical Analysis CC413 Propagation of Errors.
Binary Arithmetic.
Floating Point Numbers
Errors in Numerical Methods
Numerical Analysis CC413 Propagation of Errors. 2 In numerical methods, the calculations are not made with exact numbers. How do these inaccuracies propagate.
Module 2.2 Errors 03/08/2011. Sources of errors Data errors Modeling Implementation errors Absolute and relative errors Round off errors Overflow and.
Cosc 2150: Computer Organization Chapter 9, Part 3 Floating point numbers.
Chapter 2 Errors in Numerical Methods and Their Impacts.
Floating Point Numbers
Introduction to Numerical Analysis I
Department of Computer Science Georgia State University
Machine arithmetic and associated errors Introduction to error analysis Class II.
Objectives Today: P4 Data Types – Floating Points P4 Variable Quiz P3 Iteration and Selection Practical Are you logged on? Then come around the table Unit.
ME 142 Engineering Computation I
Number Systems and Binary Arithmetic
New head garb has been ordered
Machine arithmetic and associated errors Introduction to error analysis (cont.) Class III.
Chapter 6 Floating Point
Taylor series in numerical computations (review)
Chapter 2 ERROR ANALYSIS
Recall our hypothetical computer Marc-32
Errors in Numerical Methods
INTRODUCTION TO SCIENTIFIC COMPUTING
Class Notes 18: Numerical Methods (1/2)
Roundoff and Truncation Errors
CSCI206 - Computer Organization & Programming
Errors in Numerical Methods
ERT 207 Analytical Chemistry
Section 11.3 Power Series.
Approximations and Round-Off Errors Chapter 3
Chapter 3 DataStorage Foundations of Computer Science ã Cengage Learning.
Numerical Analysis Lecture 2.
Roundoff and Truncation Errors
Errors and Error Analysis Lecture 2
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
Applications For practice we denote
Presentation transcript:

Chapter 1 / Error in Numerical Method What is The Error ? How it is happened ?

Error = True Value – Approximate Value Definition The Error in a computed quantity is defined as: Error = True Value – Approximate Value Example: - True Value : phi = 3.14159265358979 - Appr. Value : 22/7 = 3.14285714285714 - Error = -0.00126448926735

Kind of Error The Absolute Error is measure the magnitude of the error The Relatife Error is a measure of the error in relation to the size of the true value

Example True value : 10 m Appr. Value : 9 m True value : 1000 m

Source of Error Truncation Error Round-off Error Caused by approximation used in the mathematical formula of the scheme Round-off Error Caused by the limited number of digits that represent numbers in a computer and The ways numbers are stored and additions and substractions are performed in a computer

Background of The Truncation Error Numerical solutions are mostly approximations for exact solution Most numerical methods are based on approximating function by polynomials How accurately the polynomial is approximating the true function ? Comparing the polynomial to the exact solution it becames possible to evaluate the error, called truncation error

Taylor Series The most important polynomials used to derived numerical schemes and analyze truncation errors With an infinite power series, it is exactly represents a function within a certain radius about a given point

Taylor’s Theorem (See Introduction to Real Analysis by Bartle and Sherbert for proves)

Applications For practice we denote Find the Taylor expansion of sin(x) about answer:

How about the Taylor expansion of Tan(x) at ? The Taylor expansion of a function about is called the Maclaurin series. Thus, Maclaurin series for sin(x) is, It is impossible in practical applications to include an infinite number of terms. Therefore, the Taylor series has to be truncated after a certain order term

If the Taylor series is truncated after the N th order term, it is expressed as Since cannot be found exactly, the error term is often approximated by

Example 1: Find the Taylor expansion of about which use the first two, three, four and five and evaluate for x= 0.5, respectively. Answer:

Example 2: Find the Taylor expansion of about which use the first two, three, four and five and evaluate for x= 0.5, respectively. Answer:

Summary from example 1 and 2: Order of Trunc. Er. Ratio 0.14872.. 0.04368.. 3.4 0.023721.. 0.00356.. 6.66 0.002887.. 2.1988..e-04 13.13 0.0002837.. 1.090..e-0.5 26.03

Numbers on Computers Computers do not use the decimal system in computations and memory but use the binary system It caused by computer memory consists of a huge number of electronic and magnetic recording devices, of which each element has only “on” and “off” statuses

Example: In a single precision, 4 bytes, or equivalently 32 bits, are used to store one real number. If a decimal number is given by input, it first converted to the closest binary in the normalized format: where a is always 1 and b’s are binary digit that are 0 or 1; z is an exponent which is also expressed in binary.

Numbers Store in Computer’s Memory for Single Precision (IBM 370) where s is as sign (+ or -), e is an exponent, and m is a mantissa including the a and b’s. Example:

Causes Round-off Error The summation of these two numbers becomes Because the mantissa has 24 bits, therefore, the result of this calculation is stored in memory as Thus, whenever 0.00001 is added to 1.5, the result gains 0.0000000136 as an error which called round-off error

The effects of round-off error can be minimized by changing the computational algorithm although it must be devised case by case. Some useful strategies include: Double precision Grouping Taylor expansions Changing definition of variables Rewriting the equation to avoid substraction

Chapter 1 / Error in Numerical Method Double Precision (IBM 370) In a double precision, 8 bytes, or equivalently 64 bits, are used to store one real number. In this format 1 bit is used for sign, 7 bits are used for exponent, and 56 bits are used for mantissa. Grouping when the small numbers are computed, e.g. addition, substraction, etc., grouping them helps to reduce round-off errors. For example, to add 0.00001 to unity ten thousand times one can grouped into 100 groups and each group consists of 100 small values.

Chapter 1 / Error in Numerical Method Taylor Expansions as approaches 0, accuracy of a numerical evaluation for becomes very poor because round-off errors. By using Taylor expansion, we can rewrite the equation so that the accuracy for is improved as

Chapter 1 / Error in Numerical Method Rewriting the equation to avoid substraction consider the equation of for an increasing of values x, the calculation of the equation above has a loss-of-significance error. To avoid this error one can reformulate it to get