Introduction to Numerical Analysis I

Slides:



Advertisements
Similar presentations
Fabián E. Bustamante, Spring 2007 Floating point Today IEEE Floating Point Standard Rounding Floating Point Operations Mathematical properties Next time.
Advertisements

Computer Engineering FloatingPoint page 1 Floating Point Number system corresponding to the decimal notation 1,837 * 10 significand exponent A great number.
Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved Floating-point Numbers.
Topics covered: Floating point arithmetic CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
Representing Real Numbers Using Floating Point Notation Lecture 6 CSCI 1405, CSCI 1301 Introduction to Computer Science Fall 2009.
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
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM.
Computer Science 210 Computer Organization Floating Point Representation.
Floating Point Numbers.  Floating point numbers are real numbers.  In Java, this just means any numbers that aren’t integers (whole numbers)  For example…
Binary Representation and Computer Arithmetic
Simple Data Type Representation and conversion of numbers
Ch. 2 Floating Point 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.
Lecture 2 Number Representation and accuracy
Number Systems So far we have studied the following integer number systems in computer Unsigned numbers Sign/magnitude numbers Two’s complement numbers.
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
Floating Point. Agenda  History  Basic Terms  General representation of floating point  Constructing a simple floating point representation  Floating.
Floating Point Arithmetic
ITEC 1011 Introduction to Information Technologies 4. Floating Point Numbers Chapt. 5.
1 Number Systems Lecture 10 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier, 2007.
CSPP58001 Floating Point Numbers. CSPP58001 Floating vs. fixed point Floating point refers to a binary decimal representation where there is not a fixed.
IEEE Arithmetic UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative.
Computer Architecture Lecture 22 Fasih ur Rehman.
Floating Point in Binary 1.Place Value Chart:
14/02/ Floating Point Representation Major: All Engineering Majors Authors: Autar Kaw, Charlie Barker Presented.
COMPUTER SCIENCE Data Representation and Machine Concepts Section 1.7 Instructor: Lin Chen Sept 2013.
ESO 208A/ESO 218 LECTURE 2 JULY 31, ERRORS MODELING OUTPUTS QUANTIFICATION TRUE VALUE APPROXIMATE VALUE.
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.
MATH Lesson 2 Binary arithmetic.
Floating Point Numbers
Floating Point Numbers
Nat 4/5 Computing Science Lesson 1: Binary
Floating Point Representations
Department of Computer Science Georgia State University
Machine arithmetic and associated errors Introduction to error analysis Class II.
Computer Science 210 Computer Organization
A brief comparison of integer and double representation
2.4. Floating Point Numbers
Floating Point Representations
Integer Division.
Lecture 9: Floating Point
Floating Point Numbers: x 10-18
Floating Point Number system corresponding to the decimal notation
IEEE floating point format
PRESENTED BY J.SARAVANAN. Introduction: Objective: To provide hardware support for floating point arithmetic. To understand how to represent floating.
Luddy Harrison CS433G Spring 2007
CSCI206 - Computer Organization & Programming
Number Representations
Systems Architecture I
Introduction to Scientific Computation
Floating Point Representation
(Part 3-Floating Point Arithmetic)
Computer Science 210 Computer Organization
How to represent real numbers
Approximations and Round-Off Errors Chapter 3
COMS 361 Computer Organization
Representation of real numbers
Systems Architecture I
Prof. Giancarlo Succi, Ph.D., P.Eng.
COMS 161 Introduction to Computing
Chapter 1 / Error in Numerical Method
39 32 Exponent Sign 31 Mantissa 30 Operations are perfomred with an implied binary point between bits 31 and 30. When the implied most significant.
Number Representations
Errors and Error Analysis Lecture 2
Lecture 9: Shift, Mult, Div Fixed & Floating Point
Presentation transcript:

Introduction to Numerical Analysis I MATH/CMPSC 455 Introduction to Numerical Analysis I Floating Point Representation of Real Numbers

Floating Point Representation of Real Numbers This is about how computers represent and operate real numbers. Helps us to understand rounding errors We consider IEEE 754 Floating Point Standard Representing binary numbers in computer: format machine representation

Floating Point Format Formats for decimal system Standard Notation Scientific Notation Normalized Scientific Notation

Floating Point Format Format for floating point number (binary representation) Normalized IEEE floating point standard: sign (+ or -) mantissa , which contains the significant bits. (N b’s) exponent (p, M-bit binary number) …

Precision sign Exponent (M) Mantissa (N) single 1 8 23 double 11 52 Long double 15 64 Definition (machine epsilon, ): It is the distance between 1 and the smallest floating point number greater than 1. Gives a bound on the relative error due to rounding. For the IEEE double precision floating point standard:

Rounding How do we fit a given binary number in a finite number of bits? IEEE Rounding to Nearest Rule: For double precision, if the 53rd bit to the right of the binary point is 0, then round down (truncate after the 52nd bit). If the 53rd bit is 1, then round up (add 1 to 52 bit), unless all known bits to the right of the 1 are 0’s, in which case 1 is added to bit 52 if and only if bit 52 is 1.

Rounding Notation: Denote the IEEE double precision floating point number associated to x, using the Rounding to the Nearest Rule, by fl(x). Definition (absolute error & relative error): Let be a computed version of the exact quantity .

Rounding Example: Example: Relative rounding error:

Machine Representation … Sign: 1 bit, 0 for positive, 1 for negative; Mantissa: 52 bits, … Exponent: 11 bits so 0 < e < 2 -1 = 2047 and p = e - 1023 1~2046  -1022 ~ 1023 2 values reserved for infinity / NaN and 0 2047  infinity if the mantissa is allzeros, NaN otherwise; 0  small numbers including 0 11

Addition and Rounding of Floating Point Numbers Step 1: line up the two numbers Double Precision Step 2: add them Higher Precision Step 3: store the result as a floating point number Double Precision

Example : Example :