Numerical Analysis CC413 Propagation of Errors. 2 In numerical methods, the calculations are not made with exact numbers. How do these inaccuracies propagate.

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.
Can You Trust Your Computer? CS365 – Mathematics of Computer Science Spring 2007 David Uhrig Tiffany Sharrard.
Numerical Analysis 1 EE, NCKU Tien-Hao Chang (Darby Chang)
ECIV 201 Computational Methods for Civil Engineers Richard P. Ray, Ph.D., P.E. Error Analysis.
Approximations and Errors
NUMERICAL ERROR ENGR 351 Numerical Methods for Engineers
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.
Revision.
NUMERICAL ERROR ENGR 351 Numerical Methods for Engineers Southern Illinois University Carbondale College of Engineering Dr. L.R. Chevalier.
1 Error Analysis Part 1 The Basics. 2 Key Concepts Analytical vs. numerical Methods Representation of floating-point numbers Concept of significant digits.
1 Systems of Linear Equations Error Analysis and System Condition.
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM.
Major: All Engineering Majors Author(s): Autar Kaw
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 31.
Ch 8.1 Numerical Methods: The Euler or Tangent Line Method
Introduction and Analysis of Error Pertemuan 1
Numerical Computations in Linear Algebra. Mathematically posed problems that are to be solved, or whose solution is to be confirmed on a digital computer.
Significant Figures.
Chapter 1 Scientific Computing Approximation in Scientific Computing (1.2) January 12, 2010.
MMJ 1113 Computational Methods for Engineers Mohsin Mohd Sies Fakulti Kejuruteraan Mekanikal, Universiti Teknologi Malaysia.
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.
MATH 685/CSI 700 Lecture Notes Lecture 1. Intro to Scientific Computing.
CISE301_Topic11 CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4:
ES 240: Scientific and Engineering Computation. Chapter 4 Chapter 4: Errors Uchechukwu Ofoegbu Temple University.
Round-off Errors.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University 1 Chapter 1 Mathematical.
Round-off Errors and Computer Arithmetic. The arithmetic performed by a calculator or computer is different from the arithmetic in algebra and calculus.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter.
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.
1 Floating Point Operations - Part II. Multiplication Do unsigned multiplication on the mantissas including the hidden bits Do unsigned multiplication.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 3.
Meeting 15 Introduction to Numerical Methods Error Analysis.
Numerical Analysis CC413 Propagation of Errors.
Errors in Numerical Methods
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Truncation Errors and the Taylor Series Chapter 4.
ESO 208A/ESO 218 LECTURE 2 JULY 31, ERRORS MODELING OUTPUTS QUANTIFICATION TRUE VALUE APPROXIMATE VALUE.
Chapter 6: Random Errors in Chemical Analysis. 6A The nature of random errors Random, or indeterminate, errors can never be totally eliminated and are.
Introduction to error analysis Class II "The purpose of computing is insight, not numbers", R. H. Hamming.
Module 2.2 Errors 03/08/2011. Sources of errors Data errors Modeling Implementation errors Absolute and relative errors Round off errors Overflow and.
1 Approximations and Round-Off Errors Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis Applied Numerical Method for Engineers Chapter.
Numerical Methods and Optimization C o u r s e 1 By Bharat R Chaudhari.
1 M 277 (60 h) Mathematics for Computer Sciences Bibliography  Discrete Mathematics and its applications, Kenneth H. Rosen  Numerical Analysis, Richard.
Cosc 2150: Computer Organization Chapter 9, Part 3 Floating point numbers.
Chapter 2 Errors in Numerical Methods and Their Impacts.
NUMERICAL ANALYSIS I. Introduction Numerical analysis is concerned with the process by which mathematical problems are solved by the operations.
Introduction to Numerical Analysis I
Machine arithmetic and associated errors Introduction to error analysis Class II.
ME 142 Engineering Computation I
New head garb has been ordered
Secant Method.
Machine arithmetic and associated errors Introduction to error analysis (cont.) Class III.
Chapter 2 ERROR ANALYSIS
Recall our hypothetical computer Marc-32
Errors in Numerical Methods
Roundoff and Truncation Errors
Errors in Numerical Methods
Approximations and Round-Off Errors Chapter 3
Numerical Analysis Lecture 2.
Chapter 1 / Error in Numerical Method
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.
Presentation transcript:

Numerical Analysis CC413 Propagation of Errors

2 In numerical methods, the calculations are not made with exact numbers. How do these inaccuracies propagate through the calculations?

Source of errors Rounding Truncation Inherent Mistakes

Underflow and Overflow Numbers occurring in calculations that have a magnitude less than ( ) result in underflow and are generally set to zero. Numbers greater than ( ) result in overflow.

Significant Figures Number of significant figures indicates precision. Significant digits of a number are those that can be used with confidence, e.g., the number of certain digits plus one estimated digit. 53,800How many significant figures? 5.38 x x x

Significant Figures Zeros are sometimes used to locate the decimal point not significant figures N = then N = x t= 4 N = x 10 +1

Error Definitions Numerical error - use of approximations to represent exact mathematical operations and quantities true value = approximation + error Error = true value - approximation Error = |N – n| Absolut error Relative error = error / true value R.E. = |N-n|/|N| = |N-n|/|n|

Example 1: Find the bounds for the propagation in adding two numbers. For example if one is calculating X +Y where X = 1.5 ± 0.05 Y = 3.4 ± 0.04 Solution Maximum possible value of X = 1.55 and Y = 3.44 Maximum possible value of X + Y = = 4.99 Minimum possible value of X = 1.45 and Y = Minimum possible value of X + Y = = 4.81 Hence 4.81 ≤ X + Y ≤4.99.

Example 2: The strain in an axial member of a square cross-section is given by Given Find the maximum possible error in the measured strain.

Example 2: Solution

Example Consider a problem where the true answer is If you report the value as 7.92, answer the following questions. 1.What is the true error? 2.What is the relative error?

Example Determine the absolute and relative errors when approximating p by p ∗ when

Solution This example shows that the same relative error, ×10 −1, occurs for widely varying absolute errors. the absolute error can be misleading and the relative error more meaningful, because the relative error takes into consideration the size of the value.

Error Definitions cont. Round off error – Symmetric rounding originate from the fact that computers retain only a fixed number of significant figures: y = to be Error = y-round(y) = and relative error = error /y =

Error Definitions cont. Truncation errors – Chopping errors that result from using an approximation in place of an exact mathematical procedure: y = to be Error = and relative error =

Example Determine the five-digit (a) chopping and (b) rounding values of the irrational number π. Solution The number π has an infinite decimal expansion of the form π = Written in normalized decimal form, we have π = × 10. (a) The floating-point form of π using five-digit chopping is f l(π) = × 10 = (b) The sixth digit of the decimal expansion of π is a 9, so the floating-point form of π using five-digit rounding is f l(π) = ( ) × 10 =

Example Suppose that x = 57 and y = 13. Use five-digit chopping for calculating x + y, x − y, x × y, and x ÷ y. Solution: Note that 

Solution (Cont.)

Use absolute value. Computations are repeated until stopping criterion is satisfied. If the following criterion is met you can be sure that the result is correct to at least n significant figures. Pre-specified % tolerance based on the knowledge of your solution

20 Round-off Errors (Error Bounds Analysis) Round down Round up fl(z) is the rounded value of z

21 Chopping Errors (Error Bounds Analysis) Suppose the mantissa can only support n digits. Suppose ß = 10 (base 10), what are the values of a i such that the errors are the largest? Thus the absolute and relative chopping errors are

22 Chopping Errors (Error Bounds Analysis)

23 Round-off Errors (Error Bounds Analysis) Absolute error of fl(z) When rounding down Similarly, when rounding up i.e., when

24 Round-off Errors (Error Bounds Analysis) Relative error of fl(z)

25 Summary of Error Bounds Analysis β base n # of significant digits or # of digits in the mantissa Regardless of chopping or round-off is used to round the numbers, the absolute errors may increase as the numbers grow in magnitude but the relative errors are bounded by the same magnitude. Chopping ErrorsRound-off errors Absolute Relative

Numerical Stability Rounding errors may accumulate and propagate unstably in a bad algorithm. Can be proven that for Gaussian elimination the accumulated error is bounded

Ill-conditioned problem If small error in data input produce large error in solution When |f’(x)| is large 1.0 x +3.5 y = x y = 16.1 Sol is (1.0, 2.0) if Changed to 2.12x y = 16.1 Sol is (0.8333, 2.048)

28 Ill-conditioned system of equations A small deviation in the entries of A matrix, causes a large deviation in the solution.  

29 Machine Epsilon Relative chopping error Relative round-off error eps is known as the machine epsilon – the smallest number such that 1 + eps > 1 epsilon = 1; while (1 + epsilon > 1) epsilon = epsilon / 2; epsilon = epsilon * 2; Algorithm to compute machine epsilon

30 Exercise Discuss to what extent (a + b)c = ac + bc is violated in machine arithmetic.

Error Propagation Let x fl refer to the floating point representation of the real number x. Since computer has fixed word length, there is a difference between x and x fl (round-off error) and we would like to estimate the error in the calculation of f(x) : Both x and f(x) are unknown. If x fl is close to x, then we can use first order Taylor expansion and compute: Result: If f’(x fl ) and  x are known, then we can estimate the error using this formula