1 Floating point arithmetic
|
|
- Kristian Barker
- 6 years ago
- Views:
Transcription
1 Introduction to Floating Point Arithmetic Floating point arithmetic Floating point representation (scientific notation) of numbers, for example, takes the following form sign fraction base exponent In general, floating point numbers with p digits and base β are represented as. It is normalized if b 0. ±.b b 2 b p β e, 0 b i β. (.) 2. The number p of digits determines the accuracy (precision) of representing an arbitrary number α in the format (.). Given a number that has more than p digits α = ±.b b 2 b p b p+ b m β e, it has to be rounded before it fits the format (.). A natural choice is to use the nearest number of the form (.) to approximate α. That nearest number is where ˆα = ±.b b 2 b p ˆbp β e, ˆbp = { bp, if b p+.b p+2 b m < 2 β, b p +, if b p+.b p+2 b m 2 β. It can be seen that the absolute representation error α ˆα. 00 }{{ 0} ( 2 β) βe = ( 2 β)β p β e = 2 βe p, p 0 s and the relative representation error α ˆα α 2 βe p.b b 2 b p b p+ b m β e 2 β p.b b 2 b p b p+ b m 2 β p. = 2 β p. So 2 β p is the maximum relative representation error, which is also half the distance between and the next larger floating point number + β p. We have ˆα = α + ˆα α = α( + ˆα α ) α( + δ), (.2) α where δ u def = 2 β p, the unit roundoff. Extra care should be taken towards the case when b p = β. For example rounding to 6 decimal digit number gives.3460.
2 3. The range in which the exponent e can vary e min e e max, determines the largest and smallest representable numbers in magnitudes, where e min and e max are positive integers. Any normalized number α of form (.) satisfies α. (β )(β ) (β ) β e max = ( β p )β e max = (. 00 }{{}}{{ 0} ) β e max, p (β ) s p 0 s and α. 00 }{{ 0} β e min = β e min. p 0 s Overflow when a number in magnitude is bigger than ( β p )β emax. computation will be aborted when Overflow occurs. Typically Underflow when a number in magnitude is smaller than β e min. One choice is to flush the number to zero when Underflow occurs, but numerically more sensible choice is the so-called Gradual Underflow through a transition of subnormal numbers. IEEE floating point standard for binary arithmetic. SUN, DEC, IBM, HP workstations and all PCs. It is most common, e.g., on IEEE Single Precision takes 4 bytes = 32 bits long: 8 23 s e f sign exponent binary point fraction It represents ( ) s 2 e 27 ( + f) (note: the leading in the fraction need not be stored explicitly, because it is always. This hidden bit accounts for the + here). The maximum relative representation error (unit roundoff) is = and the range of positive normalized numbers is from 2 26 to or about from to IEEE Double Precision takes 8 bytes = 64 bits long: 52 s e f sign exponent It represents ( ) s 2 e 023 ( + f). binary point fraction The maximum relative representation error is and the range of positive normalized numbers is from to or about from to
3 IEEE Arithmetic Exceptions and default results Exception type Example Default result Invalid operation 0/0, 0, NaN (Not a Number) Overflow ± Divide by zero Finite nonzero/0 ± Underlow Subnormal numbers Inexact Whenever fl(x y) x y Correctly rounded result Floating point arithmetic models. Let {+,,, } be one of the four basic arithmetic operations, and let x and y be two floating point numbers. It is unlikely that the exact x y fits into the working floating point number system without roundoffs. For example, suppose we work with 4 decimal digits, and consider = , = Both require more than 4 decimal places to hold the results; so roundoffs are inevitable. Ideally a computer could perform basic arithmetic operations (and square root ) in such a way that the computed result is the exact value rounded to the nearest floating point number; this implies at the best the computed result fl(x y) satisfies fl(x y) = (x y)( + δ), for some δ 2 β p. (.3) IEEE Floating Point Arithmetic requires this! When this is guaranteed, we say that x y is correctly rounded. 2 Floating point error analysis How Do the Four Basic Arithmetic Operations Behave? Let u be the unit roundoff of the working floating point number system. Let ˆx and ŷ be the floating point numbers and that ˆx = x( + ϵ ) and ŷ = y( + ϵ 2 ), for ϵ i ϵ, where ϵ could be the error in the process of collecting the data. Addition and subtraction. fl(ˆx + ŷ) = (ˆx + ŷ)( + δ), δ u Subtraction behaves the same as Addition does. = x( + ϵ )( + δ) + y( + ϵ 2 )( + δ) = x + y + x(ϵ + δ + O(ϵu)) + y(ϵ 2 + δ + O(ϵu)) ( = (x + y) + x x + y (ϵ + δ + O(ϵu)) + y ) x + y (ϵ 2 + δ + O(ϵu)) ˆδ can be bounded as follows: (x + y)( + ˆδ). ˆδ x + y x + y [ϵ + u + O(ϵu)]. 3
4 . If x and y have the same sign, i.e., xy > 0, then x + y = x + y ; this implies ˆδ ϵ + u + O(ϵu). Thus fl(ˆx + ŷ) approximates x + y no worse that ˆx and ŷ does to x and y. 2. If x y x + y 0, then ( x + y )/ x + y ; this implies that ˆδ could be nearly or much bigger than. Thus fl(ˆx + ŷ) may turn out to have nothing to do with the true x+y. This is so called catastrophic cancellation which happens when a floating point number is subtracted from another nearly equal floating point number In general, if ( x + y )/ x + y is not too big, fl(ˆx + ŷ) provides a good approximation to x + y. Example 2.. Computing n + n straightforward causes substantial loss of significant digits for large n n fl( n + ) fl( n) fl(fl( n + ) fl( n).00e e e e-06.00e e e e-06.00e e e e-07.00e e e e-07.00e e e e-08.00e e e e-08.00e e e e+00 Catastrophic cancellation sometimes may be avoided if a formula is properly reformulated. In the present case, one can compute n + n almost to full precision by using n + n = /( n + + n). as shown in the following table. n.00e+0.00e+.00e+2.00e+3.00e+4.00e+5.00e+6 fl(/( n + + n)) e e e e e e e-09 In fact, one has where δ 5u + O(u 2 ). fl(/( n + + n)) = ( n + n)( + δ), (2.4) 2 In our model of floating point arithmetic, we know that there is a small relative error associated with individual arithmetic operations. It is important to realize that, however, that this is not necessarily the case when a sequence of operations is involved. 4
5 Multiplication and division. These two operations are very well-behaved. fl(ˆx ŷ) = (ˆx ŷ)( + δ) = xy( + ϵ )( + ϵ 2 )( + δ) xy( + ˆδ ), fl(ˆx/ŷ) = (ˆx/ŷ)( + δ) = (x/y)( + ϵ )( + ϵ 2 ) ( + δ) xy( + ˆδ ), where ˆδ = δ + δ 2 + δ + O(ϵu), ˆδ = δ δ 2 + δ + O(ϵu). Thus ˆδ 2ϵ + u + O(ϵu) and ˆδ 2ϵ + u + O(ϵu). Forward and backward error analysis. We illustrate the idea through an example. Consider the computation of an inner product of two vector x, y R 3 x y def = x y + x 2 y 2 + x 3 y 3, assuming already x i s and y j s are floating point numbers. It is likely that fl(x y) is computed in the following order. fl(x y) = fl ( fl(fl(x y ) + fl(x 2 y 2 )) + fl(x 3 y 3 ) ). Adopting the floating point arithmetic model, we have fl(x y) = fl ( fl(x y ( + ϵ ) + x 2 y 2 ( + ϵ 2 )) + x 3 y 3 ( + ϵ 3 ) ) = fl ( (x y ( + ϵ ) + x 2 y 2 ( + ϵ 2 ))( + δ ) + x 3 y 3 ( + ϵ 3 ) ) = ( (x y ( + ϵ ) + x 2 y 2 ( + ϵ 2 ))( + δ ) + x 3 y 3 ( + ϵ 3 ) ) ( + δ 2 ) = x y ( + ϵ )( + δ )( + δ 2 ) + x 2 y 2 (( + ϵ 2 )( + δ )( + δ 2 ) +x 3 y 3 (( + ϵ 3 )( + δ 2 ), where ϵ i u and δ j u. Now there are two ways to interpret the errors in the computed fl(x y). We have where fl(x y) = x y + E, E = x y (ϵ + δ + δ 2 ) + x 2 y 2 (ϵ 2 + δ + δ 2 ) + x 3 y 3 (ϵ 3 + δ 2 ) + O(u 2 ), E u(3 x y + 3 x 2 y x 3 y 3 ) + O(u 2 ). This bound on E tells the worst case difference between the exact x y and its computed value. Such an error analysis is so-called the Forward Error Analysis. 2. We can also write fl(x y) = ˆx ŷ, ˆx = x ( + ϵ ), ŷ = y ( + δ )( + δ 2 ) y ( + ˆδ ), ˆx 2 = x 2 ( + ϵ 2 ), ŷ 2 = y 2 ( + δ )( + δ 2 ) y 2 ( + ˆδ 2 ), ˆx 3 = x 3 ( + ϵ 3 ), ŷ 3 = y 3 ( + δ 2 ) y 3 ( + ˆδ 3 ). 3 There are many ways to distribute factors ( + ϵ i) and ( + δ j) to x i and y j. In this case it is even possible to make either ˆx x or ŷ y. 5
6 It can be seen that ˆδ = ˆδ 2 2u + O(u 2 ) and ˆδ 3 u. This says the computed value fl(x y) is the exact inner product of a slightly perturbed ˆx and ŷ. Such an error analysis is so-called the Backward Error Analysis. 6
ECS 231 Computer Arithmetic 1 / 27
ECS 231 Computer Arithmetic 1 / 27 Outline 1 Floating-point numbers and representations 2 Floating-point arithmetic 3 Floating-point error analysis 4 Further reading 2 / 27 Outline 1 Floating-point numbers
More informationCME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 5. Ax = b.
CME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 5 GENE H GOLUB Suppose we want to solve We actually have an approximation ξ such that 1 Perturbation Theory Ax = b x = ξ + e The question is, how
More informationJim Lambers MAT 610 Summer Session Lecture 2 Notes
Jim Lambers MAT 610 Summer Session 2009-10 Lecture 2 Notes These notes correspond to Sections 2.2-2.4 in the text. Vector Norms Given vectors x and y of length one, which are simply scalars x and y, the
More informationFLOATING POINT ARITHMETHIC - ERROR ANALYSIS
FLOATING POINT ARITHMETHIC - ERROR ANALYSIS Brief review of floating point arithmetic Model of floating point arithmetic Notation, backward and forward errors Roundoff errors and floating-point arithmetic
More informationBinary floating point
Binary floating point Notes for 2017-02-03 Why do we study conditioning of problems? One reason is that we may have input data contaminated by noise, resulting in a bad solution even if the intermediate
More informationElements of Floating-point Arithmetic
Elements of Floating-point Arithmetic Sanzheng Qiao Department of Computing and Software McMaster University July, 2012 Outline 1 Floating-point Numbers Representations IEEE Floating-point Standards Underflow
More informationFLOATING POINT ARITHMETHIC - ERROR ANALYSIS
FLOATING POINT ARITHMETHIC - ERROR ANALYSIS Brief review of floating point arithmetic Model of floating point arithmetic Notation, backward and forward errors 3-1 Roundoff errors and floating-point arithmetic
More informationElements of Floating-point Arithmetic
Elements of Floating-point Arithmetic Sanzheng Qiao Department of Computing and Software McMaster University July, 2012 Outline 1 Floating-point Numbers Representations IEEE Floating-point Standards Underflow
More informationFloating-point Computation
Chapter 2 Floating-point Computation 21 Positional Number System An integer N in a number system of base (or radix) β may be written as N = a n β n + a n 1 β n 1 + + a 1 β + a 0 = P n (β) where a i are
More informationChapter 1 Error Analysis
Chapter 1 Error Analysis Several sources of errors are important for numerical data processing: Experimental uncertainty: Input data from an experiment have a limited precision. Instead of the vector of
More informationLecture 7. Floating point arithmetic and stability
Lecture 7 Floating point arithmetic and stability 2.5 Machine representation of numbers Scientific notation: 23 }{{} }{{} } 3.14159265 {{} }{{} 10 sign mantissa base exponent (significand) s m β e A floating
More informationNotes for Chapter 1 of. Scientific Computing with Case Studies
Notes for Chapter 1 of Scientific Computing with Case Studies Dianne P. O Leary SIAM Press, 2008 Mathematical modeling Computer arithmetic Errors 1999-2008 Dianne P. O'Leary 1 Arithmetic and Error What
More informationArithmetic and Error. How does error arise? How does error arise? Notes for Part 1 of CMSC 460
Notes for Part 1 of CMSC 460 Dianne P. O Leary Preliminaries: Mathematical modeling Computer arithmetic Errors 1999-2006 Dianne P. O'Leary 1 Arithmetic and Error What we need to know about error: -- how
More informationNotes on floating point number, numerical computations and pitfalls
Notes on floating point number, numerical computations and pitfalls November 6, 212 1 Floating point numbers An n-digit floating point number in base β has the form x = ±(.d 1 d 2 d n ) β β e where.d 1
More informationFloating Point Number Systems. Simon Fraser University Surrey Campus MACM 316 Spring 2005 Instructor: Ha Le
Floating Point Number Systems Simon Fraser University Surrey Campus MACM 316 Spring 2005 Instructor: Ha Le 1 Overview Real number system Examples Absolute and relative errors Floating point numbers Roundoff
More informationMathematical preliminaries and error analysis
Mathematical preliminaries and error analysis Tsung-Ming Huang Department of Mathematics National Taiwan Normal University, Taiwan September 12, 2015 Outline 1 Round-off errors and computer arithmetic
More information1 Backward and Forward Error
Math 515 Fall, 2008 Brief Notes on Conditioning, Stability and Finite Precision Arithmetic Most books on numerical analysis, numerical linear algebra, and matrix computations have a lot of material covering
More informationErrors. Intensive Computation. Annalisa Massini 2017/2018
Errors Intensive Computation Annalisa Massini 2017/2018 Intensive Computation - 2017/2018 2 References Scientific Computing: An Introductory Survey - Chapter 1 M.T. Heath http://heath.cs.illinois.edu/scicomp/notes/index.html
More informationBinary Floating-Point Numbers
Binary Floating-Point Numbers S exponent E significand M F=(-1) s M β E Significand M pure fraction [0, 1-ulp] or [1, 2) for β=2 Normalized form significand has no leading zeros maximum # of significant
More informationChapter 1 Mathematical Preliminaries and Error Analysis
Chapter 1 Mathematical Preliminaries and Error Analysis Per-Olof Persson persson@berkeley.edu Department of Mathematics University of California, Berkeley Math 128A Numerical Analysis Limits and Continuity
More informationTu: 9/3/13 Math 471, Fall 2013, Section 001 Lecture 1
Tu: 9/3/13 Math 71, Fall 2013, Section 001 Lecture 1 1 Course intro Notes : Take attendance. Instructor introduction. Handout : Course description. Note the exam days (and don t be absent). Bookmark the
More informationHomework 2 Foundations of Computational Math 1 Fall 2018
Homework 2 Foundations of Computational Math 1 Fall 2018 Note that Problems 2 and 8 have coding in them. Problem 2 is a simple task while Problem 8 is very involved (and has in fact been given as a programming
More informationWhat Every Programmer Should Know About Floating-Point Arithmetic DRAFT. Last updated: November 3, Abstract
What Every Programmer Should Know About Floating-Point Arithmetic Last updated: November 3, 2014 Abstract The article provides simple answers to the common recurring questions of novice programmers about
More informationRound-off Errors and Computer Arithmetic - (1.2)
Round-off Errors and Comuter Arithmetic - (.). Round-off Errors: Round-off errors is roduced when a calculator or comuter is used to erform real number calculations. That is because the arithmetic erformed
More informationIntroduction to Scientific Computing Languages
1 / 21 Introduction to Scientific Computing Languages Prof. Paolo Bientinesi pauldj@aices.rwth-aachen.de Numerical Representation 2 / 21 Numbers 123 = (first 40 digits) 29 4.241379310344827586206896551724137931034...
More informationCompute the behavior of reality even if it is impossible to observe the processes (for example a black hole in astrophysics).
1 Introduction Read sections 1.1, 1.2.1 1.2.4, 1.2.6, 1.3.8, 1.3.9, 1.4. Review questions 1.1 1.6, 1.12 1.21, 1.37. The subject of Scientific Computing is to simulate the reality. Simulation is the representation
More information4.2 Floating-Point Numbers
101 Approximation 4.2 Floating-Point Numbers 4.2 Floating-Point Numbers The number 3.1416 in scientific notation is 0.31416 10 1 or (as computer output) -0.31416E01..31416 10 1 exponent sign mantissa base
More informationMATH ASSIGNMENT 03 SOLUTIONS
MATH444.0 ASSIGNMENT 03 SOLUTIONS 4.3 Newton s method can be used to compute reciprocals, without division. To compute /R, let fx) = x R so that fx) = 0 when x = /R. Write down the Newton iteration for
More informationPowerPoints organized by Dr. Michael R. Gustafson II, Duke University
Part 1 Chapter 4 Roundoff and Truncation Errors PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright The McGraw-Hill Companies, Inc. Permission required for reproduction
More information1 Finding and fixing floating point problems
Notes for 2016-09-09 1 Finding and fixing floating point problems Floating point arithmetic is not the same as real arithmetic. Even simple properties like associativity or distributivity of addition and
More informationIntroduction to Scientific Computing Languages
1 / 19 Introduction to Scientific Computing Languages Prof. Paolo Bientinesi pauldj@aices.rwth-aachen.de Numerical Representation 2 / 19 Numbers 123 = (first 40 digits) 29 4.241379310344827586206896551724137931034...
More informationACM 106a: Lecture 1 Agenda
1 ACM 106a: Lecture 1 Agenda Introduction to numerical linear algebra Common problems First examples Inexact computation What is this course about? 2 Typical numerical linear algebra problems Systems of
More informationHow do computers represent numbers?
How do computers represent numbers? Tips & Tricks Week 1 Topics in Scientific Computing QMUL Semester A 2017/18 1/10 What does digital mean? The term DIGITAL refers to any device that operates on discrete
More informationEAD 115. Numerical Solution of Engineering and Scientific Problems. David M. Rocke Department of Applied Science
EAD 115 Numerical Solution of Engineering and Scientific Problems David M. Rocke Department of Applied Science Computer Representation of Numbers Counting numbers (unsigned integers) are the numbers 0,
More informationLecture Notes 7, Math/Comp 128, Math 250
Lecture Notes 7, Math/Comp 128, Math 250 Misha Kilmer Tufts University October 23, 2005 Floating Point Arithmetic We talked last time about how the computer represents floating point numbers. In a floating
More informationNumber Representation and Waveform Quantization
1 Number Representation and Waveform Quantization 1 Introduction This lab presents two important concepts for working with digital signals. The first section discusses how numbers are stored in memory.
More informationComputer Arithmetic. MATH 375 Numerical Analysis. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Computer Arithmetic
Computer Arithmetic MATH 375 Numerical Analysis J. Robert Buchanan Department of Mathematics Fall 2013 Machine Numbers When performing arithmetic on a computer (laptop, desktop, mainframe, cell phone,
More informationChapter 1 Computer Arithmetic
Numerical Analysis (Math 9372) 2017-2016 Chapter 1 Computer Arithmetic 1.1 Introduction Numerical analysis is a way to solve mathematical problems by special procedures which use arithmetic operations
More informationMAT 460: Numerical Analysis I. James V. Lambers
MAT 460: Numerical Analysis I James V. Lambers January 31, 2013 2 Contents 1 Mathematical Preliminaries and Error Analysis 7 1.1 Introduction............................ 7 1.1.1 Error Analysis......................
More informationNumerics and Error Analysis
Numerics and Error Analysis CS 205A: Mathematical Methods for Robotics, Vision, and Graphics Doug James (and Justin Solomon) CS 205A: Mathematical Methods Numerics and Error Analysis 1 / 30 A Puzzle What
More informationThe Classical Relative Error Bounds for Computing a2 + b 2 and c/ a 2 + b 2 in Binary Floating-Point Arithmetic are Asymptotically Optimal
-1- The Classical Relative Error Bounds for Computing a2 + b 2 and c/ a 2 + b 2 in Binary Floating-Point Arithmetic are Asymptotically Optimal Claude-Pierre Jeannerod Jean-Michel Muller Antoine Plet Inria,
More information1.1 COMPUTER REPRESENTATION OF NUM- BERS, REPRESENTATION ERRORS
Chapter 1 NUMBER REPRESENTATION, ERROR ANALYSIS 1.1 COMPUTER REPRESENTATION OF NUM- BERS, REPRESENTATION ERRORS Floating-point representation x t,r of a number x: x t,r = m t P cr, where: P - base (the
More informationNumerical Algorithms. IE 496 Lecture 20
Numerical Algorithms IE 496 Lecture 20 Reading for This Lecture Primary Miller and Boxer, Pages 124-128 Forsythe and Mohler, Sections 1 and 2 Numerical Algorithms Numerical Analysis So far, we have looked
More informationPhysics 12 Rules for Significant Digits and Rounding
1 Physics 12 Rules for Significant Digits and Rounding One mathematical aspect of problem-solving in the physical sciences that gives some students difficulty deals with the rounding of computed numerical
More informationNumerical Methods - Preliminaries
Numerical Methods - Preliminaries Y. K. Goh Universiti Tunku Abdul Rahman 2013 Y. K. Goh (UTAR) Numerical Methods - Preliminaries 2013 1 / 58 Table of Contents 1 Introduction to Numerical Methods Numerical
More informationApplied Mathematics 205. Unit 0: Overview of Scientific Computing. Lecturer: Dr. David Knezevic
Applied Mathematics 205 Unit 0: Overview of Scientific Computing Lecturer: Dr. David Knezevic Scientific Computing Computation is now recognized as the third pillar of science (along with theory and experiment)
More informationNumerical Methods. Dr Dana Mackey. School of Mathematical Sciences Room A305 A Dana Mackey (DIT) Numerical Methods 1 / 12
Numerical Methods Dr Dana Mackey School of Mathematical Sciences Room A305 A Email: Dana.Mackey@dit.ie Dana Mackey (DIT) Numerical Methods 1 / 12 Practical Information The typed notes will be available
More informationLecture notes to the course. Numerical Methods I. Clemens Kirisits
Lecture notes to the course Numerical Methods I Clemens Kirisits November 8, 08 ii Preface These lecture notes are intended as a written companion to the course Numerical Methods I taught from 06 to 08
More informationALU (3) - Division Algorithms
HUMBOLDT-UNIVERSITÄT ZU BERLIN INSTITUT FÜR INFORMATIK Lecture 12 ALU (3) - Division Algorithms Sommersemester 2002 Leitung: Prof. Dr. Miroslaw Malek www.informatik.hu-berlin.de/rok/ca CA - XII - ALU(3)
More informationChapter 2 INTEGERS. There will be NO CALCULATORS used for this unit!
Chapter 2 INTEGERS There will be NO CALCULATORS used for this unit! 2.2 What are integers? 1. Positives 2. Negatives 3. 0 4. Whole Numbers They are not 1. Not Fractions 2. Not Decimals What Do You Know?!
More informationChapter 1: Preliminaries and Error Analysis
Chapter 1: Error Analysis Peter W. White white@tarleton.edu Department of Tarleton State University Summer 2015 / Numerical Analysis Overview We All Remember Calculus Derivatives: limit definition, sum
More informationTopic Contents. Factoring Methods. Unit 3: Factoring Methods. Finding the square root of a number
Topic Contents Factoring Methods Unit 3 The smallest divisor of an integer The GCD of two numbers Generating prime numbers Computing prime factors of an integer Generating pseudo random numbers Raising
More informationContents Experimental Perturbations Introduction to Interval Arithmetic Review Questions Problems...
Contents 2 How to Obtain and Estimate Accuracy 1 2.1 Basic Concepts in Error Estimation................ 1 2.1.1 Sources of Error.................... 1 2.1.2 Absolute and Relative Errors............. 4
More informationChapter 4 No. 4.0 Answer True or False to the following. Give reasons for your answers.
MATH 434/534 Theoretical Assignment 3 Solution Chapter 4 No 40 Answer True or False to the following Give reasons for your answers If a backward stable algorithm is applied to a computational problem,
More information1 ERROR ANALYSIS IN COMPUTATION
1 ERROR ANALYSIS IN COMPUTATION 1.2 Round-Off Errors & Computer Arithmetic (a) Computer Representation of Numbers Two types: integer mode (not used in MATLAB) floating-point mode x R ˆx F(β, t, l, u),
More informationROUNDOFF ERRORS; BACKWARD STABILITY
SECTION.5 ROUNDOFF ERRORS; BACKWARD STABILITY ROUNDOFF ERROR -- error due to the finite representation (usually in floatingpoint form) of real (and complex) numers in digital computers. FLOATING-POINT
More informationMTH303. Section 1.3: Error Analysis. R.Touma
MTH303 Section 1.3: Error Analysis R.Touma These lecture slides are not enough to understand the topics of the course; they could be used along with the textbook The numerical solution of a mathematical
More informationMath 411 Preliminaries
Math 411 Preliminaries Provide a list of preliminary vocabulary and concepts Preliminary Basic Netwon s method, Taylor series expansion (for single and multiple variables), Eigenvalue, Eigenvector, Vector
More informationIntroduction 5. 1 Floating-Point Arithmetic 5. 2 The Direct Solution of Linear Algebraic Systems 11
SCIENTIFIC COMPUTING BY NUMERICAL METHODS Christina C. Christara and Kenneth R. Jackson, Computer Science Dept., University of Toronto, Toronto, Ontario, Canada, M5S 1A4. (ccc@cs.toronto.edu and krj@cs.toronto.edu)
More informationChapter 1: Introduction and mathematical preliminaries
Chapter 1: Introduction and mathematical preliminaries Evy Kersalé September 26, 2011 Motivation Most of the mathematical problems you have encountered so far can be solved analytically. However, in real-life,
More informationLecture 2 MODES OF NUMERICAL COMPUTATION
1. Diversity of Numbers Lecture 2 Page 1 It is better to solve the right problem the wrong way than to solve the wrong problem the right way. The purpose of computing is insight, not numbers. Richard Wesley
More informationLecture 28 The Main Sources of Error
Lecture 28 The Main Sources of Error Truncation Error Truncation error is defined as the error caused directly by an approximation method For instance, all numerical integration methods are approximations
More informationBASIC COMPUTER ARITHMETIC
BASIC COMPUTER ARITHMETIC TSOGTGEREL GATUMUR Abstract. First, we consider how integers and fractional numbers are represented and manipulated internally on a computer. Then we develop a basic theoretical
More informationParallel Reproducible Summation
Parallel Reproducible Summation James Demmel Mathematics Department and CS Division University of California at Berkeley Berkeley, CA 94720 demmel@eecs.berkeley.edu Hong Diep Nguyen EECS Department University
More informationEssentials of Intermediate Algebra
Essentials of Intermediate Algebra BY Tom K. Kim, Ph.D. Peninsula College, WA Randy Anderson, M.S. Peninsula College, WA 9/24/2012 Contents 1 Review 1 2 Rules of Exponents 2 2.1 Multiplying Two Exponentials
More informationComplement Arithmetic
Complement Arithmetic Objectives In this lesson, you will learn: How additions and subtractions are performed using the complement representation, What is the Overflow condition, and How to perform arithmetic
More informationThe numerical stability of barycentric Lagrange interpolation
IMA Journal of Numerical Analysis (2004) 24, 547 556 The numerical stability of barycentric Lagrange interpolation NICHOLAS J. HIGHAM Department of Mathematics, University of Manchester, Manchester M13
More information8/13/16. Data analysis and modeling: the tools of the trade. Ø Set of numbers. Ø Binary representation of numbers. Ø Floating points.
Data analysis and modeling: the tools of the trade Patrice Koehl Department of Biological Sciences National University of Singapore http://www.cs.ucdavis.edu/~koehl/teaching/bl5229 koehl@cs.ucdavis.edu
More informationTHE POWERS OF THREE. J. M. WILLIAMS, JR. San Francisco, California
THE POWERS OF THREE J. M. WILLIAMS, JR. San Francisco, California Any number may be expressed in powers of three by addition or subtraction of the numbers those powers represent. 13 = 3 2 + 3 1 + 3 14
More informationINTRODUCTION TO COMPUTATIONAL MATHEMATICS
INTRODUCTION TO COMPUTATIONAL MATHEMATICS Course Notes for CM 271 / AMATH 341 / CS 371 Fall 2007 Instructor: Prof. Justin Wan School of Computer Science University of Waterloo Course notes by Prof. Hans
More informationNumerical Mathematical Analysis
Numerical Mathematical Analysis Numerical Mathematical Analysis Catalin Trenchea Department of Mathematics University of Pittsburgh September 20, 2010 Numerical Mathematical Analysis Math 1070 Numerical
More informationDSP Configurations. responded with: thus the system function for this filter would be
DSP Configurations In this lecture we discuss the different physical (or software) configurations that can be used to actually realize or implement DSP functions. Recall that the general form of a DSP
More informationNumbering Systems. Contents: Binary & Decimal. Converting From: B D, D B. Arithmetic operation on Binary.
Numbering Systems Contents: Binary & Decimal. Converting From: B D, D B. Arithmetic operation on Binary. Addition & Subtraction using Octal & Hexadecimal 2 s Complement, Subtraction Using 2 s Complement.
More informationLecture 2: Number Representations (2)
Lecture 2: Number Representations (2) ECE 645 Computer Arithmetic 1/29/08 ECE 645 Computer Arithmetic Lecture Roadmap Number systems (cont'd) Floating point number system representations Residue number
More informationChemistry: The Study of Change Chang & Goldsby 12 th edition
Chemistry: The Study of Change Chang & Goldsby 12 th edition modified by Dr. Hahn Chapter 1 Example 1.4 Determine the number of significant figures in the following measurements: (a)478 cm (b)6.01 g end
More informationNumber Systems III MA1S1. Tristan McLoughlin. December 4, 2013
Number Systems III MA1S1 Tristan McLoughlin December 4, 2013 http://en.wikipedia.org/wiki/binary numeral system http://accu.org/index.php/articles/1558 http://www.binaryconvert.com http://en.wikipedia.org/wiki/ascii
More informationMATH Dr. Halimah Alshehri Dr. Halimah Alshehri
MATH 1101 haalshehri@ksu.edu.sa 1 Introduction To Number Systems First Section: Binary System Second Section: Octal Number System Third Section: Hexadecimal System 2 Binary System 3 Binary System The binary
More informationScientific Computing Numerical Computing
Scientific Computing Numerical Computing Aleksandar Donev Courant Institute, NYU 1 donev@courant.nyu.edu 1 Course MATH-GA.2043 or CSCI-GA.2112, Fall 2015 September 3rd and 10th, 2015 A. Donev (Courant
More informationGaussian Elimination for Linear Systems
Gaussian Elimination for Linear Systems Tsung-Ming Huang Department of Mathematics National Taiwan Normal University October 3, 2011 1/56 Outline 1 Elementary matrices 2 LR-factorization 3 Gaussian elimination
More informationChemistry 320 Approx. Time: 45 min
Chemistry 320 Approx. Time: 45 min Name: 02.02.02.a1 Most Important Idea: Date: Purpose The purpose of this activity is to be able to write numbers in both standard and scientific notation, and to be able
More informationCHAPTER 11. A Revision. 1. The Computers and Numbers therein
CHAPTER A Revision. The Computers and Numbers therein Traditional computer science begins with a finite alphabet. By stringing elements of the alphabet one after another, one obtains strings. A set of
More informationHow to Ensure a Faithful Polynomial Evaluation with the Compensated Horner Algorithm
How to Ensure a Faithful Polynomial Evaluation with the Compensated Horner Algorithm Philippe Langlois, Nicolas Louvet Université de Perpignan, DALI Research Team {langlois, nicolas.louvet}@univ-perp.fr
More informationEx code
Ex. 8.4 7-4-2-1 code Codeconverter 7-4-2-1-code to BCD-code. When encoding the digits 0... 9 sometimes in the past a code having weights 7-4-2-1 instead of the binary code weights 8-4-2-1 was used. In
More informationAccurate polynomial evaluation in floating point arithmetic
in floating point arithmetic Université de Perpignan Via Domitia Laboratoire LP2A Équipe de recherche en Informatique DALI MIMS Seminar, February, 10 th 2006 General motivation Provide numerical algorithms
More informationIntroduction to Finite Di erence Methods
Introduction to Finite Di erence Methods ME 448/548 Notes Gerald Recktenwald Portland State University Department of Mechanical Engineering gerry@pdx.edu ME 448/548: Introduction to Finite Di erence Approximation
More informationNumerical Methods I Numerical Computing
Numerical Methods I Numerical Computing Aleksandar Donev Courant Institute, NYU 1 donev@courant.nyu.edu 1 MATH-GA 2011.003 / CSCI-GA 2945.003, Fall 2014 September 3rd, 2014 A. Donev (Courant Institute)
More informationAn Introduction to Numerical Analysis
An Introduction to Numerical Analysis Department of Mathematical Sciences, NTNU 21st august 2012 Practical issues webpage: http://wiki.math.ntnu.no/tma4215/2012h/start Lecturer:, elenac@math.ntnu.no Lecures:
More informationOn various ways to split a floating-point number
On various ways to split a floating-point number Claude-Pierre Jeannerod Jean-Michel Muller Paul Zimmermann Inria, CNRS, ENS Lyon, Université de Lyon, Université de Lorraine France ARITH-25 June 2018 -2-
More informationScientific Notation. Chemistry Honors
Scientific Notation Chemistry Honors Used to easily write very large or very small numbers: 1 mole of a substance consists of 602,000,000,000,000,000,000,000 particles (we ll come back to this in Chapter
More informationNegative Bit Representation Outline
Negative Bit Representation Outline 1. Negative Bit Representation Outline 2. Negative Integers 3. Representing Negativity 4. Which Bit for the Sign? 5. Sign-Value 6. Disadvantages of Sign-Value 7. One
More informationNumerical Analysis. Yutian LI. 2018/19 Term 1 CUHKSZ. Yutian LI (CUHKSZ) Numerical Analysis 2018/19 1 / 41
Numerical Analysis Yutian LI CUHKSZ 2018/19 Term 1 Yutian LI (CUHKSZ) Numerical Analysis 2018/19 1 / 41 Reference Books BF R. L. Burden and J. D. Faires, Numerical Analysis, 9th edition, Thomsom Brooks/Cole,
More informationWe are here. Assembly Language. Processors Arithmetic Logic Units. Finite State Machines. Circuits Gates. Transistors
CSC258 Week 3 1 Logistics If you cannot login to MarkUs, email me your UTORID and name. Check lab marks on MarkUs, if it s recorded wrong, contact Larry within a week after the lab. Quiz 1 average: 86%
More informationExercises MAT-INF1100. Øyvind Ryan
Exercises MAT-INF1100 Øyvind Ryan February 19, 2013 1. Formulate an algorithm for adding two three-digit numbers. You may assume that it is known how to sum one-digit numbers. Answer: We represent the
More informationNUMBERS AND CODES CHAPTER Numbers
CHAPTER 2 NUMBERS AND CODES 2.1 Numbers When a number such as 101 is given, it is impossible to determine its numerical value. Some may say it is five. Others may say it is one hundred and one. Could it
More informationFormal verification of IA-64 division algorithms
Formal verification of IA-64 division algorithms 1 Formal verification of IA-64 division algorithms John Harrison Intel Corporation IA-64 overview HOL Light overview IEEE correctness Division on IA-64
More informationChapter 1 Mathematical Preliminaries and Error Analysis
Numerical Analysis (Math 3313) 2019-2018 Chapter 1 Mathematical Preliminaries and Error Analysis Intended learning outcomes: Upon successful completion of this chapter, a student will be able to (1) list
More informationProgram 1 Foundations of Computational Math 1 Fall 2018
Program 1 Foundations of Computational Math 1 Fall 2018 Due date: 11:59PM on Friday, 28 September 2018 Written Exercises Problem 1 Consider the summation σ = n ξ i using the following binary fan-in tree
More information1. Introduction to commutative rings and fields
1. Introduction to commutative rings and fields Very informally speaking, a commutative ring is a set in which we can add, subtract and multiply elements so that the usual laws hold. A field is a commutative
More informationIntroduction CSE 541
Introduction CSE 541 1 Numerical methods Solving scientific/engineering problems using computers. Root finding, Chapter 3 Polynomial Interpolation, Chapter 4 Differentiation, Chapter 4 Integration, Chapters
More information