Module 2.2 Errors 03/08/2011. Sources of errors Data errors Modeling Implementation errors Absolute and relative errors Round off errors Overflow and.

Slides:



Advertisements
Similar presentations
2009 Spring Errors & Source of Errors SpringBIL108E Errors in Computing Several causes for malfunction in computer systems. –Hardware fails –Critical.
Advertisements

Fixed Point Numbers The binary integer arithmetic you are used to is known by the more general term of Fixed Point arithmetic. Fixed Point means that we.
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.
Floating Point Representation in Computers Floating Point Numbers - What are they? Floating Point Representation Floating Point Operations Where Things.
ECIV 201 Computational Methods for Civil Engineers Richard P. Ray, Ph.D., P.E. Error Analysis.
Round-Off and Truncation Errors
1 CSE1301 Computer Programming Lecture 30: Real Number Representation.
CSE1301 Computer Programming Lecture 33: Real Number Representation
Dr Damian Conway Room 132 Building 26
Number Systems Standard positional representation of numbers:
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.
Chapter3 Fixed Point Representation Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2009.
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
Numbers and number systems
2.2 Errors. Why Study Errors First? Nearly all our modeling is done on digital computers (aside: what would a non-digital analog computer look like?)
POWERPOINT THE SECOND In which you will learn about: Scientific notation +/-/x/÷ with sig figs Rounding.
Computer Arithmetic Nizamettin AYDIN
Error: Finding Creative ways to Screw Up CS 170: Computing for the Sciences and Mathematics.
1 Lecture 5 Floating Point Numbers ITEC 1000 “Introduction to Information Technology”
Computer Arithmetic Programming in C++ Computer Science Dept Va Tech August, 2000 © Barnette ND, McQuain WD, Keenan MA 1 Independent Representation.
CEN 316 Computer Organization and Design Computer Arithmetic Floating Point Dr. Mansour AL Zuair.
Chapter 1 Data Storage(3) Yonsei University 1 st Semester, 2015 Sanghyun Park.
1 COMS 161 Introduction to Computing Title: Numeric Processing Date: October 22, 2004 Lecture Number: 24.
Lecture 2 Number Representation and accuracy
Ellen Spertus MCS 111 October 11, 2001 Floating Point Arithmetic.
Chem 160- Ch # 2l. Numbers from measurements.. Measurements Experiments are performed. Numerical values or data are obtained from these measurements.
Computing Systems Basic arithmetic for computers.
Introduction to Numerical Analysis I
Data Representation in Computer Systems
Floating Point (a brief look) We need a way to represent –numbers with fractions, e.g., –very small numbers, e.g., –very large numbers,
Computer Science Engineering B.E.(4 th sem) c omputer system organization Topic-Floating and decimal arithmetic S ubmitted to– Prof. Shweta Agrawal Submitted.
5.2 Errrors. Why Study Errors First? Nearly all our modeling is done on digital computers (aside: what would a non-digital analog computer look like?)
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.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter.
Floating Point Arithmetic
MECN 3500 Inter - Bayamon Lecture 3 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
SIGNIFICANT FIGURES. What are they?  It is important to be honest when reporting a measurement, so that it does not appear to be more accurate than the.
Scientific notation is a quick way of writing very large or very small numbers. Scientific Notation & Significant Digits Example #1 Write m/s.
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.
Computer Arithmetic Floating Point. We need a way to represent –numbers with fractions, e.g., –very small numbers, e.g., –very large.
Significant Figure Rules RulesExamples The following are always significant Non zero digits Zeros between non zero digits Zero to the right of a non zero.
Numerical Analysis CC413 Propagation of Errors.
10/7/2004Comp 120 Fall October 7 Read 5.1 through 5.3 Register! Questions? Chapter 4 – Floating Point.
Numerical Analysis CC413 Propagation of Errors. 2 In numerical methods, the calculations are not made with exact numbers. How do these inaccuracies propagate.
Binary Numbers The arithmetic used by computers differs in some ways from that used by people. Computers perform operations on numbers with finite and.
Cosc 2150: Computer Organization Chapter 9, Part 3 Floating point numbers.
Introduction to Numerical Analysis I
Floating Point Representations
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.
Binary Numbers The arithmetic used by computers differs in some ways from that used by people. Computers perform operations on numbers with finite and.
Integer Division.
Floating Point Numbers: x 10-18
Floating Point Number system corresponding to the decimal notation
April 2006 Saeid Nooshabadi
A Level Computing Component 2
Chapter 2 ERROR ANALYSIS
CSCI206 - Computer Organization & Programming
Approximations and Round-Off Errors Chapter 3
COMS 361 Computer Organization
Computer Organization
UNIVERSITY OF MASSACHUSETTS Dept
UNIVERSITY OF MASSACHUSETTS Dept
Chapter3 Fixed Point Representation
ID1050– Quantitative & Qualitative Reasoning
Presentation transcript:

Module 2.2 Errors 03/08/2011

Sources of errors Data errors Modeling Implementation errors Absolute and relative errors Round off errors Overflow and underflow Arithmatic errors Error propagation Truncation errors

Precision:the number of significant digits Floating point number : a decimal expansion Flops: FLoating point Operations Per Second, a measure of a computer's performance, especially in fields of scientific calculations that make heavy use of floating point calculationscomputerperformancefloating point calculations Exponential notation: a floating point number as a decimal fraction times a power of 10 (a*10^n,  10 3 ) a – significand, fractional part, mantissa, n- exponent A normalized number in exp notation has the decimal point immediately preceding the first nonzero digit. The significant digits of a floating point number are all the digits except the leading zeros The significant digits of an integer are all the digits except the leading and trailing zeros

Exponential notation Example:  10 3 Fractional part or significand? Exponent? 3 Normalized?  10 5

Significant digits Significant digits of floating point number All digits except leading zeros Number of significant digits in  10 3 ? 9 significant digits Precision Number of significant digits

Magnitude Power of 10 when number expressed in normalized exponential notation Magnitude of  10 3 ? Magnitude of  10 5 ? 10 5

Absolute error |correct – result| Example: correct =  10 5 and result =  10 5 Absolute error = ? |   10 5 | =  10 5 = 0.990

Relative error |(correct - result) / correct| Example: (correct - result) = and correct =  /(  10 5 ) =  10 -5

Round-off error Problem of not having enough bits to store entire floating point number(round up, round down) and approximating the result to the nearest number that can be represented Example:  10 5 if only can store 6 significant digits, rounded?  10 5 Do not test directly for equality of floating point variables

Overflow/underflow Overflow - error condition that occurs when not enough bits to express value in computer Underflow - error condition that occurs when result of computation is too small for computer to represent

Arithematic errors;Algebra rules do not necessarily hold x = 355/113, y = 101/112, z = 52/113 All different ways of calculating x - 3y - z should be 0, but is not

Addition and subtraction errors If big difference in magnitude of numbers Example: (0.65  10 5 ) + (0.98  ) = ? = Suppose can store 6 significant digits rounded? = (  10 5 )

Associative property Does not necessarily hold Sum of many small numbers + large number may not equal adding each small number to large number Similarly, distributive property does not necessarily hold

Cancellation error Problem of subtracting numbers that are almost equal Answer can have fewer significant digits than original numbers

To reduce numerical errors Round-off errors Use maximum number of significant digits If big difference in magnitude of numbers Add from smallest to largest numbers

Propagated (accumulation ) round-off errors Example: repeatedly executing t = t + dt Better to repeatedly increment i and calculate t = i * dt

Truncation error Error that occurs when truncated, or finite, sum is used as approximation for sum of infinite series