CHAPTER 2 SENSITIVITY OF LINEAR SYSTEMS; EFFECTS OF ROUNDOFF ERRORS
|
|
- Calvin Carroll
- 5 years ago
- Views:
Transcription
1 CHAPTER SENSITIVITY OF LINEAR SYSTEMS; EFFECTS OF ROUNDOFF ERRORS The two main concepts involved here are the condition (of a problem) and the stability (of an algorithm). Both of these concepts deal with the effects of small changes (perturbations) in the data. In this regard, the text uses the term "sensitivity" of a linear system to refer to how its solution is affected by small changes in the data. Some notation regarding floating-point arithmetic: b denotes the base of the number system k denotes the floating-point precision (the number of significant digits in the mantissa or fractional part of a floating-point number) nonzero floating-point numbers are always stored in a normalized form: e ± 0. d d L d k b, where d and each d i is a base b digit (0 d i b for i k ). The floating-point representation fl (x) of a real number x is obtained by either chopping or rounding its (infinite) base b expansion to k significant digits (and adjusting the exponent so that it is normalized). For example, if b = 0, k = 4 and x = /, then 0 and ( x) fl = + with chopping arithmetic ( x) fl = + with rounding arithmetic. The following material is from my CSc 49A notes. 64
2 FLOATING-POINT ARITHMETIC -- a simulation of real arithmetic -- Notation: we ll use the symbol f l. For example, if x denotes a real number, then fl (x) denotes its floating-point representation. Similarly, if a and b are floatingpoint numbers, then fl ( a + b), a b), a b), a / b) denote the floating-point sum, difference, product and quotient, respectively, of a and b. The implementation of these floating-point operations (in either software or hardware) depends on several factors, and includes, for example, a choice regarding -- rounding or chopping -- the number of significant digits used for floating-point addition and subtraction. For simplicity, we ll consider only idealized floating-point arithmetic, which is defined as follows. Let denote any one of the basic arithmetic operations + /, and let x and y denote floating-point numbers. f l ( x y) is obtained by performing exact arithmetic on x and y, and then rounding or chopping this result to k significant digits. Note : although no actual digital computers or calculators implement floating-point arithmetic this way (it s too expensive, as it requires a very long accumulator for doing addition and subtraction), idealized floating-point arithmetic -- behaves very much like any actual implementation -- is very simple to do in hand s, and -- has accuracy almost identical to that of any actual implementation. Note. If f l is applied to an arithmetic expression containing more than one arithmetic operation, then each of the arithmetic operations must be replaced by its corresponding floating-point operation. For example, and fl ( x + y z) means x + y) z) fl ( xy + z / cos( x)) means x y) + z / cos( x))). Each l f operation is computed according to the rules of idealized floating-point arithmetic, that is, the exact value of the result is rounded or chopped to k significant 65
3 digits before proceeding with the rest of the. Note that we ll compute x fl (cos x), fl ( x), e ) and so on this way. Note : with idealized floating-point arithmetic, the maximum relative error in f l ( x y) is the same as the maximum relative error in converting a real number z to floating-point form. Thus, for a single floating-point + /, the relative error is very small: it is < b k (with chopping) or < b k (with rounding). However, the relative error in a floating-point might be large if more than one floating-point operation is performed. For example, compute f l ( x + y + z) when x = , y = , z = using base b =0, precision k =4, rounding idealized floating-point arithmetic. 0 fl ( x + y) = since x + y = fl ( x + y + z) = since.. = Since the exact value x + y + z = , the relative error is = 0. or %. Note, however, that this large relative error can be avoided by changing the order in which these numbers are added together. Consider the evaluation of We obtain f l ( x + z + y) = x + z) + y). fl ( x + z) = x + z) + y) = or since which has a relative error of only or 0.08% = , 66
4 ERRORS AND FLOATING-POINT ARITHMETIC Example. Using b = 0, k = 4 chopping floating-point arithmetic, evaluate for x =.76, y = , z =.67. w = 000 x x y z x y) = x y) z) = x) = w) = Exact w = / ) = ,5. So fl (w ) has no correct significant digits. 6 Example. Approximate e x for x = 5.5 using b = 0, k = 5 rounding floating-point arithmetic and the Taylor polynomial approximation (expanded about x 0 = 0) e x 4 n x x x x + x L +.!! 4! n! The floating-point results in the summation of the following terms: 67
5 e and so on. Using rounding floating-point arithmetic with b = 0 and k = 5, this sum equals (or ) after summing 5 terms (that is, n = 4), and no further terms change this sum (as they are all < 0 7 ). However, the exact value of e 5.5 is (to 6 significant digits), so 5.5 fl ( e ) has no correct significant digits. 68
6 CONDITION AND STABILITY In analyzing the effects of round-off error on an inaccurate computed solution, we want to distinguish whether the algorithm (the procedure for computing the solution) is at fault, or whether the problem is such that no algorithm can be expected to reasonably solve the problem. Concepts involved: stable/unstable algorithm well-conditioned/ill-conditioned problem Definition A problem whose (exact) solution can change greatly with small changes in the data defining the problem is called ill-conditioned. data {d i exact solution {r i defining a problem exact arithmetic perturbed problem, data { ˆ d i = {d i + ε i exact solution { ˆ r i with ε i d i small exact arithmetic If there exist small ε i such that { r ˆ i are not close to {r i, then the problem is ill-conditioned. ˆ i r i for all small i If { r { ε, then the problem is well-conditioned. Example : Consider the system of linear equations Hx = b : / / / / / 4 / / 4 / 5 x x x = / 6 /. 47 / 60 Using the exact { d i given above in the matrix H and the vector b, the exact solution is x =. However, if the entries of H and b are rounded to significant decimal digits to give the following perturbed problem H ˆ x ˆ = b ˆ : 69
7 xˆ 0.50 xˆ 0.00 xˆ = then the exact solution (to 5 significant digits) is.0895 ˆx = Thus, the problem of solving Hx = b is ill-conditioned. Note. The condition of a problem has nothing to do with floating-point arithmetic or round-off error; it is defined in terms of exact. However, if a problem is ill-conditioned, it will be difficult (or impossible) to solve accurately using floating-point arithmetic. Definition. An algorithm is said to be stable (for a class of problems) if it determines a computed solution (using floating-point arithmetic) that is close to the exact solution of some (small) perturbation of the given problem. given problem, specified by computed solution data {d i floating-point {r i perturbed problem, data exact solution {ˆ d i ={d i + ε i exact { r ˆ i with ε i d i small If there exist data d ˆ i d i (small ε i for all i) such that r ˆ i r i (for all i), then the algorithm is said to be stable. Meaning: the effect of the floating-point arithmetic (the round-off error) is no worse than the effect of slightly perturbing the given problem, and solving the perturbed problem exactly. 70
8 Note. If there exists no set of data { d ˆ i close to {d i such that algorithm is said to be unstable. rˆ r for all i, then the i i Stability analysis of the of a solution to the problem considered above in Example. If Gaussian elimination with partial pivoting (an algorithm considered in Chapter 6) is implemented in base 0, precision k =, chopping, floating-point arithmetic, and is used to solve the system of linear equations Hˆ xˆ = bˆ : xˆ xˆ xˆ = , then the computed solution is r ] T = [ , whereas the exact solution is T approximately x ˆ = [ ]. However, this is stable, since there exists a perturbed problem ( H ˆ + E)ˆ r = bˆ + e, for example, rˆ = rˆ.08507, 0.78 rˆ T whose exact solution r ˆ = [ ] is close to r. Since the size of the perturbations E and e is small, the of the computed solution r is stable. Analysis of Example. The problem of computing w = 000 x x y z for x = 0.76, y = , z = 0.67 is ill-conditioned; that is, the value of w is x, y, z. very sensitive to small changes in the data { For example, consider the perturbed problem having data x ˆ = 0.75, y ˆ = y and z ˆ = The perturbations are small (relative error) given that the floating-point precision is k = 4: x ˆ x x = , y ˆ y y = 0.0, z ˆ z z =
9 given problem, data { x, y, z w = 55,5.05 exact perturbed problem, data { xˆ, yˆ, zˆ w ˆ = 45,4.7 exact Since { x, yˆ, zˆ { x, y, z ˆ and w ˆ is not close to w, the problem is ill-conditioned. Note. This illustrates a general principle: division by a small, inaccurate number will create a large error. E.g., = 000 but In the above calculation of w, there is cancellation and a loss of significant digits in computing x y z using floating-point arithmetic. Thus fl ( x y z) is relatively small and may be inaccurate, implying that the computed w is likely inaccurate. Stability analysis: The algorithm for computing w simply refers to the floating-point fl ( 000 x) / x y) z) ) To show that this algorithm is stable, one needs to find perturbed data { x, yˆ, zˆ ˆ so that the exact solution of this perturbed problem is close to the computed solution of the given problem. 7
10 given problem, computed solution data { x, y, z floating-point w = 9,000 perturbed problem, with data x ˆ = x exact solution y ˆ = y exact w ˆ = 9,000 z ˆ = ˆ ˆ, ˆ ˆ (in fact w ˆ = w in this case), the algorithm is stable. Since { x, y z { x, y, z and w w Note from this example that a stable algorithm does not guarantee an accurate computed solution. If the problem is well-conditioned, then a stable algorithm will produce an accurate computed solution, but not necessarily if the problem is ill-conditioned. 000x Note also that a better algorithm (for this particular data) is to evaluate fl. ( x z) y This gives the best possible computed solution. However, since the problem is illconditioned, if your data is not exact, then the computed solution will likely be very inaccurate. Analysis of Example. This is an example of what might be called catastrophic cancellation. The answer is computed as a sum of terms such as 8.9, -4.94, etc. that are accurate to at most decimal places (approximately 0.00). But the correct value of e 5.5 is Thus, the computed value of is essentially a sum of round-off errors! The (correct) significant digits in most of the numbers added together cancel out. 7
11 Condition data. The problem is well-conditioned; that is, it is not sensitive to small changes in the e 5.5+ ε = e = e e ε ε + ε + ε L. So for all ε such that ε / 5. 5 is small, since the ε and higher order terms in ε are much smaller than ε, we have e ε e 5.5 ( + ε ), implying that the relative error e 5.5 e 5.5+ε e 5.5 ε is small. Stability The algorithm used to compute e 5.5 is unstable: given problem, data x = 5.5 floating-point perturbed problem, solution will be x ˆ = ε exact near e with ε /5.5 small for all small ε. Explanation for this: cannot find small ε so that e ε.0066 because e x is a continuous function and e = e = That is, if e ε.0066, then ε , but this is not a small perturbation of
12 Note. A stable algorithm for computing e 5.5 (and, in general, for computing e x for x < 0 ): e 5.5 = e 5.5 = (5.5) + (5.5) E.g., using b = 0, k = 5 floating-point arithmetic, this (using 8 terms of the Taylor polynomial approximation) gives a computed solution of (which is very accurate). 75
Roundoff Errors and Computer Arithmetic
Jim Lambers Math 105A Summer Session I 2003-04 Lecture 2 Notes These notes correspond to Section 1.2 in the text. Roundoff Errors and Computer Arithmetic In computing the solution to any mathematical problem,
More informationScientific Computing: An Introductory Survey
Scientific Computing: An Introductory Survey Chapter 1 Scientific Computing Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign Copyright c 2002. Reproduction
More informationComputational Methods. Sources of Errors
Computational Methods Sources of Errors Manfred Huber 2011 1 Numerical Analysis / Scientific Computing Many problems in Science and Engineering can not be solved analytically on a computer Numeric solutions
More information2 Computation with Floating-Point Numbers
2 Computation with Floating-Point Numbers 2.1 Floating-Point Representation The notion of real numbers in mathematics is convenient for hand computations and formula manipulations. However, real numbers
More informationChapter 03: Computer Arithmetic. Lesson 09: Arithmetic using floating point numbers
Chapter 03: Computer Arithmetic Lesson 09: Arithmetic using floating point numbers Objective To understand arithmetic operations in case of floating point numbers 2 Multiplication of Floating Point Numbers
More informationCS321 Introduction To Numerical Methods
CS3 Introduction To Numerical Methods Fuhua (Frank) Cheng Department of Computer Science University of Kentucky Lexington KY 456-46 - - Table of Contents Errors and Number Representations 3 Error Types
More informationComputing Basics. 1 Sources of Error LECTURE NOTES ECO 613/614 FALL 2007 KAREN A. KOPECKY
LECTURE NOTES ECO 613/614 FALL 2007 KAREN A. KOPECKY Computing Basics 1 Sources of Error Numerical solutions to problems differ from their analytical counterparts. Why? The reason for the difference is
More informationSection 1.4 Mathematics on the Computer: Floating Point Arithmetic
Section 1.4 Mathematics on the Computer: Floating Point Arithmetic Key terms Floating point arithmetic IEE Standard Mantissa Exponent Roundoff error Pitfalls of floating point arithmetic Structuring computations
More information2 Computation with Floating-Point Numbers
2 Computation with Floating-Point Numbers 2.1 Floating-Point Representation The notion of real numbers in mathematics is convenient for hand computations and formula manipulations. However, real numbers
More informationfractional quantities are typically represented in computers using floating point format this approach is very much similar to scientific notation
Floating Point Arithmetic fractional quantities are typically represented in computers using floating point format this approach is very much similar to scientific notation for example, fixed point number
More informationMathematical preliminaries and error analysis
Mathematical preliminaries and error analysis Tsung-Ming Huang Department of Mathematics National Taiwan Normal University, Taiwan August 28, 2011 Outline 1 Round-off errors and computer arithmetic IEEE
More informationErrors in Computation
Theory of Errors Content Errors in computation Absolute Error Relative Error Roundoff Errors Truncation Errors Floating Point Numbers Normalized Floating Point Numbers Roundoff Error in Floating Point
More information2.1.1 Fixed-Point (or Integer) Arithmetic
x = approximation to true value x error = x x, relative error = x x. x 2.1.1 Fixed-Point (or Integer) Arithmetic A base 2 (base 10) fixed-point number has a fixed number of binary (decimal) places. 1.
More informationFloating-point representation
Lecture 3-4: Floating-point representation and arithmetic Floating-point representation The notion of real numbers in mathematics is convenient for hand computations and formula manipulations. However,
More informationCS321. Introduction to Numerical Methods
CS31 Introduction to Numerical Methods Lecture 1 Number Representations and Errors Professor Jun Zhang Department of Computer Science University of Kentucky Lexington, KY 40506 0633 August 5, 017 Number
More informationFloating-Point Numbers in Digital Computers
POLYTECHNIC UNIVERSITY Department of Computer and Information Science Floating-Point Numbers in Digital Computers K. Ming Leung Abstract: We explain how floating-point numbers are represented and stored
More informationFloating-Point Numbers in Digital Computers
POLYTECHNIC UNIVERSITY Department of Computer and Information Science Floating-Point Numbers in Digital Computers K. Ming Leung Abstract: We explain how floating-point numbers are represented and stored
More informationAccuracy versus precision
Accuracy versus precision Accuracy is a consistent error from the true value, but not necessarily a good or precise error Precision is a consistent result within a small error, but not necessarily anywhere
More informationMAT128A: Numerical Analysis Lecture Two: Finite Precision Arithmetic
MAT128A: Numerical Analysis Lecture Two: Finite Precision Arithmetic September 28, 2018 Lecture 1 September 28, 2018 1 / 25 Floating point arithmetic Computers use finite strings of binary digits to represent
More informationOutline. 1 Scientific Computing. 2 Approximations. 3 Computer Arithmetic. Scientific Computing Approximations Computer Arithmetic
Outline 1 2 3 Michael T. Heath 2 / 46 Introduction Computational Problems General Strategy What is scientific computing? Design and analysis of algorithms for numerically solving mathematical problems
More informationNumerical Computing: An Introduction
Numerical Computing: An Introduction Gyula Horváth Horvath@inf.u-szeged.hu Tom Verhoeff T.Verhoeff@TUE.NL University of Szeged Hungary Eindhoven University of Technology The Netherlands Numerical Computing
More informationMost nonzero floating-point numbers are normalized. This means they can be expressed as. x = ±(1 + f) 2 e. 0 f < 1
Floating-Point Arithmetic Numerical Analysis uses floating-point arithmetic, but it is just one tool in numerical computation. There is an impression that floating point arithmetic is unpredictable and
More informationLecture Notes to Accompany. Scientific Computing An Introductory Survey. What is scientific computing?
Lecture Notes to Accompany Scientific Computing An Introductory Survey Second Edition by Michael T. Heath Scientific Computing What is scientific computing? Design and analysis of algorithms for solving
More informationReview Questions 26 CHAPTER 1. SCIENTIFIC COMPUTING
26 CHAPTER 1. SCIENTIFIC COMPUTING amples. The IEEE floating-point standard can be found in [131]. A useful tutorial on floating-point arithmetic and the IEEE standard is [97]. Although it is no substitute
More informationScientific Computing: An Introductory Survey
Scientific Computing: An Introductory Survey Chapter 1 Scientific Computing Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign Copyright c 2002. Reproduction
More informationReview of Calculus, cont d
Jim Lambers MAT 460/560 Fall Semester 2009-10 Lecture 4 Notes These notes correspond to Sections 1.1 1.2 in the text. Review of Calculus, cont d Taylor s Theorem, cont d We conclude our discussion of Taylor
More informationME 261: Numerical Analysis. ME 261: Numerical Analysis
ME 261: Numerical Analysis 3. credit hours Prereq.: ME 163/ME 171 Course content Approximations and error types Roots of polynomials and transcendental equations Determinants and matrices Solution of linear
More informationIntroduction to floating point arithmetic
Introduction to floating point arithmetic Matthias Petschow and Paolo Bientinesi AICES, RWTH Aachen petschow@aices.rwth-aachen.de October 24th, 2013 Aachen, Germany Matthias Petschow (AICES, RWTH Aachen)
More informationChapter 3. Errors and numerical stability
Chapter 3 Errors and numerical stability 1 Representation of numbers Binary system : micro-transistor in state off 0 on 1 Smallest amount of stored data bit Object in memory chain of 1 and 0 10011000110101001111010010100010
More informationMath 340 Fall 2014, Victor Matveev. Binary system, round-off errors, loss of significance, and double precision accuracy.
Math 340 Fall 2014, Victor Matveev Binary system, round-off errors, loss of significance, and double precision accuracy. 1. Bits and the binary number system A bit is one digit in a binary representation
More informationIntroduction to Numerical Computing
Statistics 580 Introduction to Numerical Computing Number Systems In the decimal system we use the 10 numeric symbols 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 to represent numbers. The relative position of each symbol
More informationHani Mehrpouyan, California State University, Bakersfield. Signals and Systems
Hani Mehrpouyan, Department of Electrical and Computer Engineering, California State University, Bakersfield Lecture 3 (Error and Computer Arithmetic) April 8 th, 2013 The material in these lectures is
More informationDivide: Paper & Pencil
Divide: Paper & Pencil 1001 Quotient Divisor 1000 1001010 Dividend -1000 10 101 1010 1000 10 Remainder See how big a number can be subtracted, creating quotient bit on each step Binary => 1 * divisor or
More informationNumerical Methods 5633
Numerical Methods 5633 Lecture 2 Marina Krstic Marinkovic mmarina@maths.tcd.ie School of Mathematics Trinity College Dublin Marina Krstic Marinkovic 1 / 15 5633-Numerical Methods Organisational Assignment
More informationLecture Objectives. Structured Programming & an Introduction to Error. Review the basic good habits of programming
Structured Programming & an Introduction to Error Lecture Objectives Review the basic good habits of programming To understand basic concepts of error and error estimation as it applies to Numerical Methods
More informationComputational Economics and Finance
Computational Economics and Finance Part I: Elementary Concepts of Numerical Analysis Spring 2015 Outline Computer arithmetic Error analysis: Sources of error Error propagation Controlling the error Rates
More informationTruncation Errors. Applied Numerical Methods with MATLAB for Engineers and Scientists, 2nd ed., Steven C. Chapra, McGraw Hill, 2008, Ch. 4.
Chapter 4: Roundoff and Truncation Errors Applied Numerical Methods with MATLAB for Engineers and Scientists, 2nd ed., Steven C. Chapra, McGraw Hill, 2008, Ch. 4. 1 Outline Errors Accuracy and Precision
More information3.1 DATA REPRESENTATION (PART C)
3.1 DATA REPRESENTATION (PART C) 3.1.3 REAL NUMBERS AND NORMALISED FLOATING-POINT REPRESENTATION In decimal notation, the number 23.456 can be written as 0.23456 x 10 2. This means that in decimal notation,
More informationExponential Numbers ID1050 Quantitative & Qualitative Reasoning
Exponential Numbers ID1050 Quantitative & Qualitative Reasoning In what ways can you have $2000? Just like fractions, you can have a number in some denomination Number Denomination Mantissa Power of 10
More informationComputational Mathematics: Models, Methods and Analysis. Zhilin Li
Computational Mathematics: Models, Methods and Analysis Zhilin Li Chapter 1 Introduction Why is this course important (motivations)? What is the role of this class in the problem solving process using
More informationLecture 03 Approximations, Errors and Their Analysis
AM702 Applied Computational Methods c ecture 03 Approximations, rrors and heir Analysis Approximations and rrors c Approximation is unavoidable in mathematical modeling the real world phenomena Approximation
More informationNumber Systems CHAPTER Positional Number Systems
CHAPTER 2 Number Systems Inside computers, information is encoded as patterns of bits because it is easy to construct electronic circuits that exhibit the two alternative states, 0 and 1. The meaning of
More informationProgramming Project #2: Solving Quadratic Equations Date Due: Monday 25 September 2017
CISC 5300 Programming in C++ Fall, 2017 Programming Project #2: Solving Quadratic Equations Date Due: Monday 25 September 2017 Write a program that prompts the user to enter the coefficients of a quadratic
More informationChapter 4 Section 2 Operations on Decimals
Chapter 4 Section 2 Operations on Decimals Addition and subtraction of decimals To add decimals, write the numbers so that the decimal points are on a vertical line. Add as you would with whole numbers.
More information1.2 Round-off Errors and Computer Arithmetic
1.2 Round-off Errors and Computer Arithmetic 1 In a computer model, a memory storage unit word is used to store a number. A word has only a finite number of bits. These facts imply: 1. Only a small set
More informationBinary floating point encodings
Week 1: Wednesday, Jan 25 Binary floating point encodings Binary floating point arithmetic is essentially scientific notation. Where in decimal scientific notation we write in floating point, we write
More informationComputational Economics and Finance
Computational Economics and Finance Part I: Elementary Concepts of Numerical Analysis Spring 2016 Outline Computer arithmetic Error analysis: Sources of error Error propagation Controlling the error Rates
More informationModule 12 Floating-Point Considerations
GPU Teaching Kit Accelerated Computing Module 12 Floating-Point Considerations Lecture 12.1 - Floating-Point Precision and Accuracy Objective To understand the fundamentals of floating-point representation
More information(Refer Slide Time: 02:59)
Numerical Methods and Programming P. B. Sunil Kumar Department of Physics Indian Institute of Technology, Madras Lecture - 7 Error propagation and stability Last class we discussed about the representation
More informationFinite arithmetic and error analysis
Finite arithmetic and error analysis Escuela de Ingeniería Informática de Oviedo (Dpto de Matemáticas-UniOvi) Numerical Computation Finite arithmetic and error analysis 1 / 45 Outline 1 Number representation:
More information6.1 Evaluate Roots and Rational Exponents
VOCABULARY:. Evaluate Roots and Rational Exponents Radical: We know radicals as square roots. But really, radicals can be used to express any root: 0 8, 8, Index: The index tells us exactly what type of
More informationClasses of Real Numbers 1/2. The Real Line
Classes of Real Numbers All real numbers can be represented by a line: 1/2 π 1 0 1 2 3 4 real numbers The Real Line { integers rational numbers non-integral fractions irrational numbers Rational numbers
More informationMA 323 Geometric Modelling Course Notes: Day 10 Higher Order Polynomial Curves
MA 323 Geometric Modelling Course Notes: Day 10 Higher Order Polynomial Curves David L. Finn December 14th, 2004 Yesterday, we introduced quintic Hermite curves as a higher order variant of cubic Hermite
More informationFloating Point Representation. CS Summer 2008 Jonathan Kaldor
Floating Point Representation CS3220 - Summer 2008 Jonathan Kaldor Floating Point Numbers Infinite supply of real numbers Requires infinite space to represent certain numbers We need to be able to represent
More informationFloating-point Arithmetic. where you sum up the integer to the left of the decimal point and the fraction to the right.
Floating-point Arithmetic Reading: pp. 312-328 Floating-Point Representation Non-scientific floating point numbers: A non-integer can be represented as: 2 4 2 3 2 2 2 1 2 0.2-1 2-2 2-3 2-4 where you sum
More informationNumerical computing. How computers store real numbers and the problems that result
Numerical computing How computers store real numbers and the problems that result The scientific method Theory: Mathematical equations provide a description or model Experiment Inference from data Test
More informationNumerical Analysis I
Numerical Analysis I M.R. O Donohoe References: S.D. Conte & C. de Boor, Elementary Numerical Analysis: An Algorithmic Approach, Third edition, 1981. McGraw-Hill. L.F. Shampine, R.C. Allen, Jr & S. Pruess,
More informationFloating-Point Data Representation and Manipulation 198:231 Introduction to Computer Organization Lecture 3
Floating-Point Data Representation and Manipulation 198:231 Introduction to Computer Organization Instructor: Nicole Hynes nicole.hynes@rutgers.edu 1 Fixed Point Numbers Fixed point number: integer part
More informationFundamentals. Copyright Cengage Learning. All rights reserved.
Fundamentals Copyright Cengage Learning. All rights reserved. 1.4 Rational Expressions Copyright Cengage Learning. All rights reserved. Objectives The Domain of an Algebraic Expression Simplifying Rational
More informationComputer Arithmetic. 1. Floating-point representation of numbers (scientific notation) has four components, for example, 3.
ECS231 Handout Computer Arithmetic I: Floating-point numbers and representations 1. Floating-point representation of numbers (scientific notation) has four components, for example, 3.1416 10 1 sign significandbase
More informationNumber Systems. Both numbers are positive
Number Systems Range of Numbers and Overflow When arithmetic operation such as Addition, Subtraction, Multiplication and Division are performed on numbers the results generated may exceed the range of
More informationHomework 1 Introduction to Computational Finance Spring 2019
Homework 1 Introduction to Computational Finance Spring 2019 Solutions due Monday, 2/4/19 Answers to the homework problems and programming tasks should be sent via FSU s dropbox https://dropbox.fsu.edu
More informationCOS 323: Computing for the Physical and Social Sciences
COS 323: Computing for the Physical and Social Sciences COS 323 People: Szymon Rusinkiewicz Sandra Batista Victoria Yao Course webpage: http://www.cs.princeton.edu/cos323 What s This Course About? Numerical
More informationLesson 3: Solving Equations; Floating-point Computation
Lesson 3: Solving Equations; Floating-point Computation restart; A hard equation Last time we were looking at this equation. eq := * sin() = Pi/2; (1.1) Maple didn't know the solutions. solve(eq,,allsolutions);
More informationWhat Every Computer Scientist Should Know About Floating Point Arithmetic
What Every Computer Scientist Should Know About Floating Point Arithmetic E Note This document is an edited reprint of the paper What Every Computer Scientist Should Know About Floating-Point Arithmetic,
More informationFloating-Point Arithmetic
Floating-Point Arithmetic ECS30 Winter 207 January 27, 207 Floating point numbers Floating-point representation of numbers (scientific notation) has four components, for example, 3.46 0 sign significand
More informationScientific Computing. Error Analysis
ECE257 Numerical Methods and Scientific Computing Error Analysis Today s s class: Introduction to error analysis Approximations Round-Off Errors Introduction Error is the difference between the exact solution
More informationNumerical Solutions of Differential Equations (1)
Numerical Solutions of Differential Equations (1) Euler method Sources of error Truncation Round-off error Error balance in numerical integration Euler Method Many differential equations don't have an
More informationBITWISE OPERATORS. There are a number of ways to manipulate binary values. Just as you can with
BITWISE OPERATORS There are a number of ways to manipulate binary values. Just as you can with decimal numbers, you can perform standard mathematical operations - addition, subtraction, multiplication,
More informationFloating Point Representation in Computers
Floating Point Representation in Computers Floating Point Numbers - What are they? Floating Point Representation Floating Point Operations Where Things can go wrong What are Floating Point Numbers? Any
More informationCGF Lecture 2 Numbers
CGF Lecture 2 Numbers Numbers A number is an abstract entity used originally to describe quantity. i.e. 80 Students etc The most familiar numbers are the natural numbers {0, 1, 2,...} or {1, 2, 3,...},
More informationCOS 323: Computing for the Physical and Social Sciences
COS 323: Computing for the Physical and Social Sciences COS 323 Professor: Szymon Rusinkiewicz TAs: Mark Browning Fisher Yu Victoria Yao Course webpage http://www.cs.princeton.edu/~cos323/ What s This
More informationMark Important Points in Margin. Significant Figures. Determine which digits in a number are significant.
Knowledge/Understanding: How and why measurements are rounded. Date: How rounding and significant figures relate to precision and uncertainty. When significant figures do not apply. Skills: Determine which
More informationNumber Systems and Computer Arithmetic
Number Systems and Computer Arithmetic Counting to four billion two fingers at a time What do all those bits mean now? bits (011011011100010...01) instruction R-format I-format... integer data number text
More informationReals 1. Floating-point numbers and their properties. Pitfalls of numeric computation. Horner's method. Bisection. Newton's method.
Reals 1 13 Reals Floating-point numbers and their properties. Pitfalls of numeric computation. Horner's method. Bisection. Newton's method. 13.1 Floating-point numbers Real numbers, those declared to be
More informationCS6303 COMPUTER ARCHITECTURE LESSION NOTES UNIT II ARITHMETIC OPERATIONS ALU In computing an arithmetic logic unit (ALU) is a digital circuit that performs arithmetic and logical operations. The ALU is
More informationRev Name Date. . Round-off error is the answer to the question How wrong is the rounded answer?
Name Date TI-84+ GC 7 Avoiding Round-off Error in Multiple Calculations Objectives: Recall the meaning of exact and approximate Observe round-off error and learn to avoid it Perform calculations using
More informationFloating-Point Arithmetic
Floating-Point Arithmetic Raymond J. Spiteri Lecture Notes for CMPT 898: Numerical Software University of Saskatchewan January 9, 2013 Objectives Floating-point numbers Floating-point arithmetic Analysis
More informationMultiplying and Dividing Rational Expressions
Page 1 of 14 Multiplying and Dividing Rational Expressions Attendance Problems. Simplify each expression. Assume all variables are nonzero. x 6 y 2 1. x 5 x 2 2. y 3 y 3 3. 4. x 2 y 5 Factor each expression.
More informationSummer Review for Students entering Algebra
Class: Date: Summer Review for Students entering Algebra 08 Multiple Choice Identify the choice that best completes the statement or answers the question. SHOW ALL WORK ON THIS PAPER OR ON ADDITIONAL PAPER..
More information1.3 Floating Point Form
Section 1.3 Floating Point Form 29 1.3 Floating Point Form Floating point numbers are used by computers to approximate real numbers. On the surface, the question is a simple one. There are an infinite
More informationWhat Every Computer Scientist Should Know About Floating-Point Arithmetic
Page 1 of 87 Numerical Computation Guide Appendix D What Every Computer Scientist Should Know About Floating- Point Arithmetic Note This appendix is an edited reprint of the paper What Every Computer Scientist
More informationFloating-Point Arithmetic
Floating-Point Arithmetic 1 Numerical Analysis a definition sources of error 2 Floating-Point Numbers floating-point representation of a real number machine precision 3 Floating-Point Arithmetic adding
More informationChapter 2. Data Representation in Computer Systems
Chapter 2 Data Representation in Computer Systems Chapter 2 Objectives Understand the fundamentals of numerical data representation and manipulation in digital computers. Master the skill of converting
More informationMA 1128: Lecture 02 1/22/2018
MA 1128: Lecture 02 1/22/2018 Exponents Scientific Notation 1 Exponents Exponents are used to indicate how many copies of a number are to be multiplied together. For example, I like to deal with the signs
More informationFloating Point. The World is Not Just Integers. Programming languages support numbers with fraction
1 Floating Point The World is Not Just Integers Programming languages support numbers with fraction Called floating-point numbers Examples: 3.14159265 (π) 2.71828 (e) 0.000000001 or 1.0 10 9 (seconds in
More informationCOMPUTER ARCHITECTURE AND ORGANIZATION. Operation Add Magnitudes Subtract Magnitudes (+A) + ( B) + (A B) (B A) + (A B)
Computer Arithmetic Data is manipulated by using the arithmetic instructions in digital computers. Data is manipulated to produce results necessary to give solution for the computation problems. The Addition,
More informationWeakly Relational Domains for Floating-Point Computation Analysis
Weakly Relational Domains for Floating-Point Computation Analysis Eric Goubault, Sylvie Putot CEA Saclay, F91191 Gif-sur-Yvette Cedex, France {eric.goubault,sylvie.putot}@cea.fr 1 Introduction We present
More informationAM205: lecture 2. 1 These have been shifted to MD 323 for the rest of the semester.
AM205: lecture 2 Luna and Gary will hold a Python tutorial on Wednesday in 60 Oxford Street, Room 330 Assignment 1 will be posted this week Chris will hold office hours on Thursday (1:30pm 3:30pm, Pierce
More informationNumerical Methods I Numerical Computing
Numerical Methods I Numerical Computing Aleksandar Donev Courant Institute, NYU 1 donev@courant.nyu.edu 1 Course G63.2010.001 / G22.2420-001, Fall 2010 September 9th, 2010 A. Donev (Courant Institute)
More informationError in Numerical Methods
Error in Numerical Methods By Brian D. Storey This section will describe two types of error that are common in numerical calculations: roundoff and truncation error. Roundoff error is due to the fact that
More informationFloating Point Considerations
Chapter 6 Floating Point Considerations In the early days of computing, floating point arithmetic capability was found only in mainframes and supercomputers. Although many microprocessors designed in the
More informationClasswork. Exercises Use long division to determine the decimal expansion of. NYS COMMON CORE MATHEMATICS CURRICULUM Lesson 6 8 7
Classwork Exercises 1 5 1. Use long division to determine the decimal expansion of. 2. Use long division to determine the decimal expansion of. 3. Use long division to determine the decimal expansion of.
More informationNumeral Systems. -Numeral System -Positional systems -Decimal -Binary -Octal. Subjects:
Numeral Systems -Numeral System -Positional systems -Decimal -Binary -Octal Subjects: Introduction A numeral system (or system of numeration) is a writing system for expressing numbers, that is a mathematical
More informationNew Mexico Tech Hyd 510
Numerics Motivation Modeling process (JLW) To construct a model we assemble and synthesize data and other information to formulate a conceptual model of the situation. The model is conditioned on the science
More informationCHAPTER V NUMBER SYSTEMS AND ARITHMETIC
CHAPTER V-1 CHAPTER V CHAPTER V NUMBER SYSTEMS AND ARITHMETIC CHAPTER V-2 NUMBER SYSTEMS RADIX-R REPRESENTATION Decimal number expansion 73625 10 = ( 7 10 4 ) + ( 3 10 3 ) + ( 6 10 2 ) + ( 2 10 1 ) +(
More informationBindel, Fall 2016 Matrix Computations (CS 6210) Notes for
1 Logistics Notes for 2016-09-07 1. We are still at 50. If you are still waiting and are not interested in knowing if a slot frees up, let me know. 2. There is a correction to HW 1, problem 4; the condition
More informationBasics of Computation. PHY 604:Computational Methods in Physics and Astrophysics II
Basics of Computation Basics of Computation Computers store information and allow us to operate on it. That's basically it. Computers have finite memory, so it is not possible to store the infinite range
More informationSigned umbers. Sign/Magnitude otation
Signed umbers So far we have discussed unsigned number representations. In particular, we have looked at the binary number system and shorthand methods in representing binary codes. With m binary digits,
More informationDecimals. Chapter Five
Chapter Five Decimals 5.1 Introductions to Decimals 5.2 Adding & Subtracting Decimals 5.3 Multiplying Decimals & Circumference of a Circle 5.4 Dividing Decimals 5.5 Fractions, Decimals, & Order of Operations
More information