1.1 COMPUTER REPRESENTATION OF NUM- BERS, REPRESENTATION ERRORS
|
|
- Philip McCoy
- 5 years ago
- Views:
Transcription
1 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 case P =2will further only be considered), m t - mantissa, m t < 1, t -numberof(basep) digits in the mantissa, c r -exponent, r - number of digits in the exponent. Usually, a normalized representation is used, i.e. 1 2 m t < 1. An example base 2 number for t =4and r =2: x = , where signs of the exponent and of the mantissa have been printed in bold. Converting the example base 2 number to decimal one, we have x =2 +( ) [ ]=2.75 Format of 32 bits number according to IEEE standard 754: sign exponent 24 bits normalized mantissa bit (shifted) (first bit always equals 1 omitted) (1 bit) (8 bits) (23 bits) The set of computer floating-point numbers M R is finite, moreover: 1
2 2 CHAPTER 1. NUMBER REPRESENTATION, ERROR ANALYSIS -thelargert the more numbers is contained in the same interval (the set M is more dense ), -thelargerr the wider interval of numbers is covered by the set M. Assuming the representation of the exponent is exact, i.e. c r = c (the set M covers the whole range of numbers of interest), and denoting floating-point representation of a number x by rd(x), we have The representation is most exact if rd (x) =m t 2 c. rd (x) x min g x. g M The requirement of most exact representation is fulfilled by a standard rounding: tx m t = e i 2 i + e (t+1) 2 t, where e -1 =1, e -i =0or 1 for i =2, 3,..t+1. Hence, the roundoff error satisfies m m t 2 (t+1), where m denotes the exact mantissa (x = m 2 c ). We have rd (x) x = (m t m)2 c = m t m x m2 c m, thus the roundoff relative error satisfies because m 2 1. Using the relation we can write rd (x) x x The obtained relation implies = m t m m 2 (t+1) 2 1 =2 t, m m t 2 (t+1) =2 t t m m m t = m ε, where ε 2 t. rd (x) =m t 2 c = m2 c +(m t m)2 c = m2 c + mε2 c = m2 c (1 + ε), whichcanbewrittenintheform(most important form of the roundoff relative error, in the numerical error analysis) rd (x) =x (1 + ε), ε 2 t = eps,
3 P. Tatjewski: NUMERICAL METHODS 3 where eps denotes machine epsilon ( macheps ), eps =2 t for the considered case of the roundoff error. Base 2 t-digit floating-point representation resulting from a truncation ( chopping) of the exact number representation: tx m t = e i 2 i, hence the chopping absolute error bound is 2 t (rounding absolute error bound was 2 (t+1) for the same number), m m t 2 t. Proceeding analogously as in the case of the roundoff error an analogous representation of the chopping relative error can be obtained rd (x) =x (1 + ε), ε 2 t+1 = eps. It can be easily concluded that if a double precision arithmetic is used then ε dp =(ε) 2, where the subscript dp denotes double precision. 1.2 FLOATING-POINT ARITHMETIC Elementary arithmetic operations: +,,,/. The arithmetic operations on floating-point numbers result in floating point numbers. Denoting by fl aresultofafloating point calculation, results of elementary arithmetic operations (supplemented by the square root finding) can be written in the form fl(x ± y) =(x ± y) (1 + ε) fl(x /y) =(x /y)(1+ε), fl x = x (1 + ε), where ε eps. This means an assumption that errors in elementary arithmetic operations result only from rounding the exact results of these operations. It results in practice from the fact that computer arithmetic units use registers of longer size than the length of the machine word corresponding to the used floating-point number representation (as applied to store numbers in computer memory). Remark: Machine epsilon eps can also be defined as a minimal positive machine floating-point number g satisfying the relation fl(1 + g) > 1, i.e. eps def =min{g M : fl(1 + g) > 1, g>0}. Therefore, eps defined in the above way is also called the unit round [?].
4 4 CHAPTER 1. NUMBER REPRESENTATION, ERROR ANALYSIS 1.3 CONDITION NUMBER Describe a mathematical calculation problem as a mapping φ : R n 7 R m, w = φ (d), where d =(d 1,..., d n ) a vector of data, w =(w 1,..., w m ) a vector of results. In practice, floating-point representation (integer representation also possible) of data numbers is used for calculations, i.e. rd (d i )=d i (1 + ε i ),where ε i eps, i =1,..., n. A calculation problem is said to be ill-conditioned if small data perturbations result in large, significant changes in the result clearly, relative errors should be taken into consideration. A number characterising quantitatively an increase of relative errors in the result versus relative errors in the data is called the condition number of the given calculation task. Example. Consider the following problem: to calculate the scalar product of two vectors a P and b, φ(a, b) = n a i b i, where a) a = [1 2 3], b =[2 6 5], b) a =[ ], b =[2 6 5]. Inthecasea)theresultisw = φ(a, b) = 1. Butinthecaseb)w = 0.52 data perturbations corresponding to 2% relative errors result in 48% relative error in the result. It can be easily checked that replacing the vector b by [2 6 5] yields much smaller perturbation in the result, with the relative error similar to the relative errors in the data. Conclusion: conditioning of a calculation task depends not only on the task itself, but first of all on actual values of the task data. Denoting an absolute data error by d, d =[ d 1, d 2,..., d n ] T, a relative data error can be written as k dk kdk. If the data are of the form d i (1 + ε i ),where ε i c d, then d i = d i ε i, d =[d 1 ε 1,d 2 ε 2,..., d n ε n ] T and k dk k d k = p (d1 ε 1 ) 2 +(d 2 ε 2 ) 2 + +(d 2 ε 2 ) 2 k d k k d kc d k d k = c d, (1.1) where c d = eps for floating point data representation errors and k k denotes the Euclidean norm (the result is also valid for another standard vector norms first norm, maximum norm, see Chapter 2). Denoting an absolute solution error by w, a relative error in the solution can be written as k wk kφ (d+ d) φ (d)k =. kwk kφ (d)k
5 P. Tatjewski: NUMERICAL METHODS 5 We are interested in a relation between the relative solution error versus the relative data error. Define cond(d) = sup k dk k wk kwk, (1.2) k dk kdk where sup denotes supremum, i.e. upper limit and the supremum in (1.2) is taken over all small data perturbations d for which the perturbed problem φ (d+ d) still makes sense. The number cond(d) is called the condition number. The condition number as defined by (1.2) is a measure of the sensivity of the solution w to small data errors d. It indicates the worst possible increase of the relative solution error k wk kwk versustherelativedataerror k dk kdk. The definition (1.2) can be rewritten as k wk kwk k dk cond (d) k d k, (1.3) where cond(d) is the smallest number for which (1.3) is true. The condition number describes the maximal possible relative error in the problem solution caused by the data errors only, i.e. without errors in all elementary mathematical operations leading from the (perturbed) data to the solution. It was not possible to evaluate the condition number (it is in fact a mapping dependent on the data d) precisely as defined by (1.2) for many practical problems. Therefore, it is common to describe as the condition number cond (d) the best known estimate (i.e. closest to that defined by (1.2)) for which the inequality (1.3) holds. The relative data error can be defined in a different way than (1.1). Therefore the relation (1.3) can also be written in the form k wk kwk cond(d) RDE, (1.4) where RDE denotes Relative Data Error that can be defined as in (1.1) or in another way. Example. P Consider the calculation task φ (a, b) = n a i b i. Data are perturbed, represented as a i (1 + α i ) and b i (1 + β i ),where α i and β i
6 6 CHAPTER 1. NUMBER REPRESENTATION, ERROR ANALYSIS define relative data errors. P k wk = w a i (1 + α i ) b i (1 + β i ) n a i b i = kwk w where = (a i b i α i + a i b i β i + a i b i α i β i ) a i b i (α i + β i ) a i b i 1 a i b i (α i + β i ) (a i b i α i + a i b i β i ) max { α i + β i } = cond (a, b) RDE i a i b i cond (a, b) = and RDE =max{ α i + β i } 2eps, i if α i eps and β i eps. Let us observe that defining the problem relative data error as a sum of relative data errors of both individual data vectors a and b leads to the identical estimate RDE = k ak kak + k bk kbk 2eps. Generally, if a data vector consists of subvectors, d =(d 1, d 2,..., d k ), andifasumof subvector relative data erors is taken as a RDE,then RDE = k d1 k kd 1 k + k d2 k kd 2 k d k kd k k c d = k d eps. The estimate RDE c d = k d eps, (1.5)
7 P. Tatjewski: NUMERICAL METHODS 7 where k d is a small multiplicity of 1, is used as a certain generalisation of the relation k dk eps the relation (1.1) for the case of floating-point data representation errors kdk when c d = eps. In the estimations used in the last example a symbol 1 ofanapproximate inequality has been used. This symbol denotes (roughly speaking) that we leave in the sum only these components where data errors enter at most linearly (k α i and k β i in the example, where k is a constant). This means that we omit terms with errors entering in higher orders (k α i β i in the example, the terms k (α i ) 2,etc. would also be omitted, analogously). Being more precise, terms decreasing (with the increase of t) at least k 2 t times quicker than other terms are omitted, where k is aconstant. 1.4 ALGORITHM AND ITS NUMERICAL REA- LISATIONS Three basic and different definitions: Amathematicalproblem w =φ (d), An algorithm A(d): a recipe how to calculate the problem φ (d), i.e. a definition of a uniquely ordered sequence of elementary arithmetical operations leading from the data to the result, Numerical realisation fl(a (d)) of the algorithm A (d): a) all numbers (constants) present in the definition of the algorithm A (d) are replaced by its numerical representations, b) calculation of all elementary arithmetical operations (including standard mathematical functions) in a sequence defined by the algorithm A (d) in floating-point arithmetic fl, i.e. with numerical errors in all operations. Example: a mathematical problem: φ(a.b) =a 2 b 2, the algorithm A1(a, b): a a b b, the algorithm A2(a, b): (a + b) (a b).
8 8 CHAPTER 1. NUMBER REPRESENTATION, ERROR ANALYSIS Numerical realisation of the algorithm A1(a, b) : fl(a1(a, b) = fl(a a b b) = fl[fl(a a) fl(b b)] = [a 2 (1 + ε 1 ) b 2 (1 + ε 2 )](1 + ε 3 ) = [a 2 b 2 + a 2 ε 1 b 2 ε 2 ](1 + ε 3 ) = a 2 b 2 + a 2 ε 1 b 2 ε 2 +(a 2 b 2 )ε 3 + a 2 ε 1 ε 3 b 2 ε 2 ε 3 = 1 a 2 b 2 + a 2 ε 1 b 2 ε 2 +(a 2 b 2 )ε 3 = (a 2 b 2 )(1 + a2 ε 1 b 2 ε 2 a 2 b 2 + ε 3 ) = (a 2 b 2 )(1 + δ 1 ), where δ 1 = a2 ε 1 b 2 ε 2 + ε a 2 b 2 3 is the result relative error, δ 1 = a 2 ε 1 b 2 ε 2 + ε a 2 b 2 3 a 2 + b 2 a 2 b 2 eps + eps. Numerical realisation of the algorithm A2(a, b) : fl(a2(a, b) = fl[(a + b) (a b)] = fl[fl(a + b) fl(a b)] = [(a + b)(1 + ε 1 ) (a b)(1 + ε 2 )](1 + ε 3 ) = (a 2 b 2 )(1 + ε 1 )(1 + ε 2 )(1 + ε 3 ) = 1 (a 2 b 2 )(1 + ε 1 + ε 2 + ε 3 ) = (a 2 b 2 )(1 + δ 2 ), where δ 2 = ε 1 + ε 2 + ε 3 is the result relative error, δ 2 = ε 1 + ε 2 + ε 3 3eps. It is evident that the algorithm A1 is numerically inferior: for cases when a 2 = b 2 the relative error δ 1 can become even several orders of magnitude larger than the data relative error, whereas the relative error δ 2 of the algorithm A2 is insensitive to the values of the data vectors a and b.
9 1.5. NUMERICAL STABILITY NUMERICAL STABILITY Consider again a mathematical task φ, w = φ(d), leading from the data d to the solution w and recall that the relative data error (RDE, see section 1.3) can be estimated as follows RDE k d eps, where k d is a constant of the order of one. According to the definition of the condition number (1.3) we have k φ (d+ d) φ (d) k kφ (d)k cond (d) k d eps, where w =φ (d) is the precise mathematical result corresponding to accurate data values d and φ (d+ d) is the precise mathematical result corresponding to perturbed data values d+ d in the above definitions numerical errors in a numerical realisation fl(a(d)) of the algorithm A(d) solving the problem φ (d) were not taken into account. Now, considering these errors leads to the definition of numerical stability. An algorithm A(d) calculating a mathematical task φ (d) is called numerically stable if there exist a positive constant K s such that for every data values d from a given data set of interest D and for every sufficiently small eps (i.e., for all sufficiently strong arithmetics) the following inequality holds: kfl(a (d)) φ (d)k kφ (d)k K s cond (d) k d eps, (1.6) where the constant K s, called the stability index, is usually assumed to be not much greater than 1. It means that a numerically stable algorithm produces solutions with relative errors of about the same order of magnitude as relative errors caused by data perturbations only. In another words, a relative error in a numerical solution obtained using a stable algorithm should be of about the same order of magnitude as an error caused by data perturbations only. It follows directly from the definition (1.6) that for a numerically stable algorithm k fl(a (d)) φ (d) k lim eps 0 kφ (d)k =0. (1.7) The relation (1.7) can be sometimes found in the literature as a definition of the numerical stability. Optional. Thequantity P (d, φ) =cond (d) k d eps kwk + eps kwk (1.8) is called the inevitable error (or optimal error level), because it is not dependent on the algorithm used to calculate the task φ(d). It consists of two terms:
10 10 CHAPTER 1. NUMBER REPRESENTATION, ERROR ANALYSIS the first is an estimate of the absolute solution error caused by data perturbations only and the second is the estimate of the (exact) solution floating-point representation error. The inevitable error depends on the task condition number (cond (d)) and on the used floating-point arithmetic ( eps). It follows directly from the definition (1.8) that the following important equality holds lim P (d, φ) =0. eps 0 The numerical stability can be defined using instead of (1.6) the relation in fact an equivalent definition. kfl(a (d)) φ (d)k K s P (d, φ), Concluding, a complete relative error of a numerical solution to a mathematical problem, obtained using a numerically stable algorithm depends on: - the problem conditioning (cond(d)), -the floating-point arithmetic used (eps), - the algorithm numerical stability index (K s ). Numerical stability of algorithms can be often proved using the method of equivalent perturbations. The method relies on proving (if possible) that the numerical result fl(a(d)) is equivalent to a slightly perturbed exact solution to the task with slightly perturbed data, i.e. where fl(a (d)) = φ (d + d) (1 + η), (1.9) d i k i eps d i, ηj k j eps, whereas k i and k j are constants (not too large). Algorithms satisfying the equality (1.9) are called numerically correct. Every numerically correct algorithm is numerically stable. Effectiveness of an algorithm is evaluated as a number of elementary arithmetic operations needed to pass from the data to the result, in particular numbers of additions and subtractions AS and multiplications and divisions MD are usually stated.
11 P. Tatjewski: NUMERICAL METHODS 11 Problems. 1. Design an algorithm for calculating the task φ (x) =x 1 + x 2 + x 3, gdzie x 1 >x 2 >x 3 > 0, in a way leading to the best (smallest) estimate of numerical errors. 2. Compare numerical properties and effectiveness of the following two algorithms calculating values of the polynomial w(x), w (x) =x 3 + a 1 x 2 + a 2 x + a 3, A1: x x x + a 1 x x + a 2 x + a 3 A2: x [x (x + a 1 )+a 2 ]+a 3 (Horner scheme) 3. Evaluate an upper bound on the relative error of a numerical result obtained using the following algorithm (a +2 b) (a a b), assuming rd(a) =a, rd(b) =b. Try to modify the algorithm to improve properties of the upper bound estimate. 4. Evaluate upper bounds for E i,if à 3X! fl a i b i = 3X a i b i (1 + E i ) and rd(a i )=a i, rd(b i )=b i, i =1, 2,..., n.
FLOATING 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 informationIntroduction to Scientific Computing
(Lecture 2: Machine precision and condition number) B. Rosić, T.Moshagen Institute of Scientific Computing General information :) 13 homeworks (HW) Work in groups of 2 or 3 people Each HW brings maximally
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 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 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 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 informationIntroduction and mathematical preliminaries
Chapter Introduction and mathematical preliminaries Contents. Motivation..................................2 Finite-digit arithmetic.......................... 2.3 Errors in numerical calculations.....................
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 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 informationMathematics for Engineers. Numerical mathematics
Mathematics for Engineers Numerical mathematics Integers Determine the largest representable integer with the intmax command. intmax ans = int32 2147483647 2147483647+1 ans = 2.1475e+09 Remark The set
More information1 Floating point arithmetic
Introduction to Floating Point Arithmetic Floating point arithmetic Floating point representation (scientific notation) of numbers, for example, takes the following form.346 0 sign fraction base exponent
More informationNumerical Methods in Physics and Astrophysics
Kostas Kokkotas 2 November 6, 2007 2 kostas.kokkotas@uni-tuebingen.de http://www.tat.physik.uni-tuebingen.de/kokkotas Kostas Kokkotas 3 Error Analysis Definition : Suppose that x is an approximation to
More informationNumerical Methods - Lecture 2. Numerical Methods. Lecture 2. Analysis of errors in numerical methods
Numerical Methods - Lecture 1 Numerical Methods Lecture. Analysis o errors in numerical methods Numerical Methods - Lecture Why represent numbers in loating point ormat? Eample 1. How a number 56.78 can
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 informationNotes on Conditioning
Notes on Conditioning Robert A. van de Geijn The University of Texas Austin, TX 7872 October 6, 204 NOTE: I have not thoroughly proof-read these notes!!! Motivation Correctness in the presence of error
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 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 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 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 informationMath 471. Numerical methods Introduction
Math 471. Numerical methods Introduction Section 1.1 1.4 of Bradie 1.1 Algorithms Here is an analogy between Numerical Methods and Gastronomy: Calculus, Lin Alg., Diff. eq. Ingredients Algorithm Recipe
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 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 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 informationECS 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 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 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 informationAn Introduction to Numerical Analysis. James Brannick. The Pennsylvania State University
An Introduction to Numerical Analysis James Brannick The Pennsylvania State University Contents Chapter 1. Introduction 5 Chapter 2. Computer arithmetic and Error Analysis 7 Chapter 3. Approximation and
More informationWhat is it we are looking for in these algorithms? We want algorithms that are
Fundamentals. Preliminaries The first question we want to answer is: What is computational mathematics? One possible definition is: The study of algorithms for the solution of computational problems in
More informationNumerical Analysis and Computing
Numerical Analysis and Computing Lecture Notes #02 Calculus Review; Computer Artihmetic and Finite Precision; and Convergence; Joe Mahaffy, mahaffy@math.sdsu.edu Department of Mathematics Dynamical Systems
More informationChapter 4 Number Representations
Chapter 4 Number Representations SKEE2263 Digital Systems Mun im/ismahani/izam {munim@utm.my,e-izam@utm.my,ismahani@fke.utm.my} February 9, 2016 Table of Contents 1 Fundamentals 2 Signed Numbers 3 Fixed-Point
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 informationComputing Machine-Efficient Polynomial Approximations
Computing Machine-Efficient Polynomial Approximations N. Brisebarre, S. Chevillard, G. Hanrot, J.-M. Muller, D. Stehlé, A. Tisserand and S. Torres Arénaire, LIP, É.N.S. Lyon Journées du GDR et du réseau
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 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 informationOrder of convergence. MA3232 Numerical Analysis Week 3 Jack Carl Kiefer ( ) Question: How fast does x n
Week 3 Jack Carl Kiefer (94-98) Jack Kiefer was an American statistician. Much of his research was on the optimal design of eperiments. However, he also made significant contributions to other areas of
More informationMath 128A: Homework 2 Solutions
Math 128A: Homework 2 Solutions Due: June 28 1. In problems where high precision is not needed, the IEEE standard provides a specification for single precision numbers, which occupy 32 bits of storage.
More informationThe Euclidean Division Implemented with a Floating-Point Multiplication and a Floor
The Euclidean Division Implemented with a Floating-Point Multiplication and a Floor Vincent Lefèvre 11th July 2005 Abstract This paper is a complement of the research report The Euclidean division implemented
More informationComputation of dot products in finite fields with floating-point arithmetic
Computation of dot products in finite fields with floating-point arithmetic Stef Graillat Joint work with Jérémy Jean LIP6/PEQUAN - Université Pierre et Marie Curie (Paris 6) - CNRS Computer-assisted proofs
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 informationError Analysis for Solving a Set of Linear Equations
Error Analysis for Solving a Set of Linear Equations We noted earlier that the solutions to an equation Ax = b depends significantly on the matrix A. In particular, a unique solution to Ax = b exists if
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 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 informationA Review of Matrix Analysis
Matrix Notation Part Matrix Operations Matrices are simply rectangular arrays of quantities Each quantity in the array is called an element of the matrix and an element can be either a numerical value
More informationConditioning and Stability
Lab 17 Conditioning and Stability Lab Objective: Explore the condition of problems and the stability of algorithms. The condition number of a function measures how sensitive that function is to changes
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 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 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 informationLECTURE NOTES ELEMENTARY NUMERICAL METHODS. Eusebius Doedel
LECTURE NOTES on ELEMENTARY NUMERICAL METHODS Eusebius Doedel TABLE OF CONTENTS Vector and Matrix Norms 1 Banach Lemma 20 The Numerical Solution of Linear Systems 25 Gauss Elimination 25 Operation Count
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 informationMATH2071: LAB #5: Norms, Errors and Condition Numbers
MATH2071: LAB #5: Norms, Errors and Condition Numbers 1 Introduction Introduction Exercise 1 Vector Norms Exercise 2 Matrix Norms Exercise 3 Compatible Matrix Norms Exercise 4 More on the Spectral Radius
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 informationCHAPTER 3. Iterative Methods
CHAPTER 3 Iterative Methods As we have seen in the previous two chapters, even for problems, which are theoretically well understood, such as computing the square root, one cannot provide the perfect answer
More informationTopics. Review of lecture 2/11 Error, Residual and Condition Number. Review of lecture 2/16 Backward Error Analysis The General Case 1 / 22
Topics Review of lecture 2/ Error, Residual and Condition Number Review of lecture 2/6 Backward Error Analysis The General Case / 22 Theorem (Calculation of 2 norm of a symmetric matrix) If A = A t is
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 informationApplications of Mathematics MA 794
Foreword Applications of Mathematics MA 794 N. Chernov and I. Knowles In this course, we will discuss various applications of mathematics in sciences, industry, medicine and business. The main objective
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 informationSome Background Material
Chapter 1 Some Background Material In the first chapter, we present a quick review of elementary - but important - material as a way of dipping our toes in the water. This chapter also introduces important
More informationLecture Notes to be used in conjunction with. 233 Computational Techniques
Lecture Notes to be used in conjunction with 233 Computational Techniques István Maros Department of Computing Imperial College London V2.9e January 2008 CONTENTS i Contents 1 Introduction 1 2 Computation
More informationNUMERICAL METHODS C. Carl Gustav Jacob Jacobi 10.1 GAUSSIAN ELIMINATION WITH PARTIAL PIVOTING
0. Gaussian Elimination with Partial Pivoting 0.2 Iterative Methods for Solving Linear Systems 0.3 Power Method for Approximating Eigenvalues 0.4 Applications of Numerical Methods Carl Gustav Jacob Jacobi
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 informationLecture Notes to be used in conjunction with. 233 Computational Techniques
Lecture Notes to be used in conjunction with 233 Computational Techniques István Maros Department of Computing Imperial College London V29e January 2008 CONTENTS i Contents 1 Introduction 1 2 Computation
More informationESTIMATION OF ERROR. r = b Abx a quantity called the residual for bx. Then
ESTIMATION OF ERROR Let bx denote an approximate solution for Ax = b; perhaps bx is obtained by Gaussian elimination. Let x denote the exact solution. Then introduce r = b Abx a quantity called the residual
More informationESO 208A: Computational Methods in Engineering. Saumyen Guha
ESO 208A: Computational Methods in Engineering Introduction, Error Analysis Saumyen Guha Department of Civil Engineering IIT Kanpur What is Computational Methods or Numerical Methods in Engineering? Formulation
More informationOutline. Math Numerical Analysis. Errors. Lecture Notes Linear Algebra: Part B. Joseph M. Mahaffy,
Math 54 - Numerical Analysis Lecture Notes Linear Algebra: Part B Outline Joseph M. Mahaffy, jmahaffy@mail.sdsu.edu Department of Mathematics and Statistics Dynamical Systems Group Computational Sciences
More informationNumerical Derivatives in Scilab
Numerical Derivatives in Scilab Michaël Baudin February 2017 Abstract This document present the use of numerical derivatives in Scilab. In the first part, we present a result which is surprising when we
More informationLecture 12. Block Diagram
Lecture 12 Goals Be able to encode using a linear block code Be able to decode a linear block code received over a binary symmetric channel or an additive white Gaussian channel XII-1 Block Diagram Data
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 informationLet x be an approximate solution for Ax = b, e.g., obtained by Gaussian elimination. Let x denote the exact solution. Call. r := b A x.
ESTIMATION OF ERROR Let x be an approximate solution for Ax = b, e.g., obtained by Gaussian elimination. Let x denote the exact solution. Call the residual for x. Then r := b A x r = b A x = Ax A x = A
More informationMATH 102 INTRODUCTION TO MATHEMATICAL ANALYSIS. 1. Some Fundamentals
MATH 02 INTRODUCTION TO MATHEMATICAL ANALYSIS Properties of Real Numbers Some Fundamentals The whole course will be based entirely on the study of sequence of numbers and functions defined on the real
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 informationComputational Complexity
Computational Complexity (Lectures on Solution Methods for Economists II: Appendix) Jesús Fernández-Villaverde 1 and Pablo Guerrón 2 February 18, 2018 1 University of Pennsylvania 2 Boston College Computational
More informationError Bounds for Arithmetic Operations on Computers Without Guard Digits
IMA Journal of Numerical Analysis (1983) 3, 153-160 Error Bounds for Arithmetic Operations on Computers Without Guard Digits F. W. J. OLVER The University of Maryland and the National Bureau of Standards,
More informationCS412: Introduction to Numerical Methods
CS412: Introduction to Numerical Methods MIDTERM #1 2:30PM - 3:45PM, Tuesday, 03/10/2015 Instructions: This exam is a closed book and closed notes exam, i.e., you are not allowed to consult any textbook,
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 informationBACHELOR OF COMPUTER APPLICATIONS (BCA) (Revised) Term-End Examination December, 2015 BCS-054 : COMPUTER ORIENTED NUMERICAL TECHNIQUES
No. of Printed Pages : 5 BCS-054 BACHELOR OF COMPUTER APPLICATIONS (BCA) (Revised) Term-End Examination December, 2015 058b9 BCS-054 : COMPUTER ORIENTED NUMERICAL TECHNIQUES Time : 3 hours Maximum Marks
More informationLU Factorization. LU factorization is the most common way of solving linear systems! Ax = b LUx = b
AM 205: lecture 7 Last time: LU factorization Today s lecture: Cholesky factorization, timing, QR factorization Reminder: assignment 1 due at 5 PM on Friday September 22 LU Factorization LU factorization
More informationReview of matrices. Let m, n IN. A rectangle of numbers written like A =
Review of matrices Let m, n IN. A rectangle of numbers written like a 11 a 12... a 1n a 21 a 22... a 2n A =...... a m1 a m2... a mn where each a ij IR is called a matrix with m rows and n columns or an
More informationESSENTIALS OF COMPUTATIONAL LINEAR ALGEBRA Supplement for MSc Optimization 1
ESSENTIALS OF COMPUTATIONAL LINEAR ALGEBRA Supplement for MSc Optimization István Maros Department of Computer Science Faculty of Information Technology University of Pannonia, Veszprém maros@dcsuni-pannonhu
More informationChapter 1. Numerical Errors. Module No. 1. Errors in Numerical Computations
Numerical Analysis by Dr. Anita Pal Assistant Professor Department of Mathematics National Institute of Technology Durgapur Durgapur-73209 email: anita.buie@gmail.com . Chapter Numerical Errors Module
More informationHandout for Adequacy of Solutions Chapter SET ONE The solution to Make a small change in the right hand side vector of the equations
Handout for dequac of Solutions Chapter 04.07 SET ONE The solution to 7.999 4 3.999 Make a small change in the right hand side vector of the equations 7.998 4.00 3.999 4.000 3.999 Make a small change in
More informationQUADRATIC PROGRAMMING?
QUADRATIC PROGRAMMING? WILLIAM Y. SIT Department of Mathematics, The City College of The City University of New York, New York, NY 10031, USA E-mail: wyscc@cunyvm.cuny.edu This is a talk on how to program
More information