Errors in Numerical Methods

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.
Computer Engineering FloatingPoint page 1 Floating Point Number system corresponding to the decimal notation 1,837 * 10 significand exponent A great number.
Topics covered: Floating point arithmetic CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
Introduction to Scientific Computing ICE / ICE 508 Prof. Hyuckjae Lee KAIST- ICC
ECIV 201 Computational Methods for Civil Engineers Richard P. Ray, Ph.D., P.E. Error Analysis.
Approximations and Errors
Dr Damian Conway Room 132 Building 26
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 3 Approximations and Errors.
1 Error Analysis Part 1 The Basics. 2 Key Concepts Analytical vs. numerical Methods Representation of floating-point numbers Concept of significant digits.
Floating Point Numbers
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 31.
Simple Data Type Representation and conversion of numbers
Information Representation (Level ISA3) Floating point numbers.
Computer Organization and Architecture Computer Arithmetic Chapter 9.
Number Systems II Prepared by Dr P Marais (Modified by D Burford)
Accuracy: The closeness of a measurement to the true or actual value
Lecture 2 Number Representation and accuracy
Introduction to Numerical Analysis I
ECE232: Hardware Organization and Design
ME 142 Engineering Computation I Computer Precision & Round-Off Error.
CH09 Computer Arithmetic  CPU combines of ALU and Control Unit, this chapter discusses ALU The Arithmetic and Logic Unit (ALU) Number Systems Integer.
ECEG-3202: Computer Architecture and Organization, Dept of ECE, AAU 1 Floating-Point Arithmetic Operations.
Round-off Errors.
Floating Point Arithmetic
MECN 3500 Inter - Bayamon Lecture 3 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 3.
Meeting 15 Introduction to Numerical Methods Error Analysis.
Errors in Numerical Methods
14/02/ Floating Point Representation Major: All Engineering Majors Authors: Autar Kaw, Charlie Barker Presented.
ESO 208A/ESO 218 LECTURE 2 JULY 31, ERRORS MODELING OUTPUTS QUANTIFICATION TRUE VALUE APPROXIMATE VALUE.
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.
William Stallings Computer Organization and Architecture 8th Edition
Lesson Objectives Aims You should know about: Binary numbers ‘n’ that.
Introduction to Numerical Analysis I
Floating Point Representations
Department of Computer Science Georgia State University
Machine arithmetic and associated errors Introduction to error analysis Class II.
Dr.Faisal Alzyoud 2/20/2018 Binary Arithmetic.
ME 142 Engineering Computation I
New head garb has been ordered
Floating Point Number system corresponding to the decimal notation
CS 232: Computer Architecture II
William Stallings Computer Organization and Architecture 7th Edition
Chapter 6 Floating Point
Chapter 2 ERROR ANALYSIS
Recall our hypothetical computer Marc-32
Errors in Numerical Methods
Roundoff and Truncation Errors
Floating Point Representation
CSCI206 - Computer Organization & Programming
Introduction to Significant Figures &
How to represent real numbers
Approximations and Round-Off Errors Chapter 3
ECEG-3202 Computer Architecture and Organization
Chapter 3 DataStorage Foundations of Computer Science ã Cengage Learning.
Accuracy vs. Precision & Significant Figures
Chapter 1 / Error in Numerical Method
Roundoff and Truncation Errors
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
Presentation transcript:

Errors in Numerical Methods Chapter 2 Errors in Numerical Methods and Their Impacts

Objectives Know finite-word length effect Know computing errors, their causes and impacts to numerical calculation Know how to compute the errors Know the effect of error propagation Know how to avoid large errors

Content Introduction Finite word-length effect (Floating-point number representation) Error How to avoid error Conclusion

Introduction Why we need to know ? Computers are great tools, however, without fundamental understanding of engineering problems, they will be useless.

Finite wordlength effect How floating numbers are stored in a computer ? Sign bit Exponent Mantissa Base of the number system used IEEE 64-bit floating-point number representation

Finite wordlength effect

Finite wordlength effect Ex: 402C000000000000 S Exponent Mantissa 4 2 C 1 S = 0 E = Exp-1023=1026-1023=3 M = 1+0.11 Check with MATLAB command: “hex2num” F = +(1.11)2x23 = (1110)2=14

Finite wordlength effect(cont’d) Step to convert from decimal number to IEEE stand. Check with MATLAB Use num2hex command S Exponent Mantissa 1 4 8

Finite wordlength effect(cont’d) How to add 2 numbers :- This is done by bit alignment (only mantissa) with refer to the biggest number. Finally, the Mantissa words are added in 2’s system. Example : 1015 Ans: 1.1100011010111111010100100110001101x21072-1023 Example : 1 Ans: 1.0x21023-1023 1015 Example : 1015+1 (show only Mantissa) Ans: 1 1 1 Right shift 49 bits 1

Finite wordlength effect(cont’d) 1 1 430C6BF526340008 How to substract 2 numbers :- Complement and done by bit alignment with refer to the biggest number 1015 Example : 1015-1 1 1 1 2’s of 1 1 1015-1 1

Finite wordlength effect(cont’d) 1 1 430C6BF52633FFF8 Will u try with the following problems? -1015 -1 -1015+1

Errors Error from numerical algorithm Truncation error Round-off error Overflow/Underflow Loss of significance Negligible addition Error magnification

Errors: Numerical algorithm Numerical integration on Error from exact solution = 0.1667 Error from exact solution = 0.0011

Errors: Numerical algorithm Numerical integration on

Errors: Truncation error Truncation error is resulted from truncation series. Ex. Say x = 1 find exp(x)

Error: Loss of significance Bad subtraction in finite wordlength can create loss of significance. See the following example: Try with x= 1,10,100,…1015

Error: Propagation error Errors are propagated with the four arithmetic Operations. Let the exact values are X and Y, where their related values are x and y, respectively.

Errors Accuracy. How close is a computed or measured value to the true value Precision (or reproducibility). How close is a computed or measured value to previously computed or measured values. Inaccuracy (or bias). A systematic deviation from the actual value. Imprecision (or uncertainty or variance). Magnitude of scatter.

Errors (cont’d)

Errors (cont’d) Error Definitions True Value = Approximation + Error Et = True value – Approximation (+/-) MATLAB Example True error

Errors (cont’d) What u can see is we can’t estimate the true error for all cases !! (why ?) So we use the following error definition instead. Approximation error …

Errors (cont’d) Apply approximation error to numerical approach (iterative) (+ / -) Meaning that the result is correct at least n significant figures Define criteria :- Compute until

Errors: Practical