Faithful Horner Algorithm

Size: px
Start display at page:

Download "Faithful Horner Algorithm"

Transcription

1 ICIAM 07, Zurich, Switzerland, July 2007 Faithful Horner Algorithm Philippe Langlois, Nicolas Louvet Université de Perpignan, France Ph. Langlois (Université de Perpignan) Faithful Horner Algorithm 18 July / 16

2 General motivation Evaluation of univariate polynomials with floating point coefficients: the evaluation of a polynomial suffers from rounding errors example : in the neighborhood of a multiple root 1.5e-10 1e-10 5e e-11-1e-10 Horner algorithm Exact value Example by J. Demmel : p(x) = (x 2) 9 in expanded form, evaluated with the Horner algorithm in IEEE double precision, near the multiple root x = 2-1.5e Ph. Langlois (Université de Perpignan) Faithful Horner Algorithm 18 July / 16

3 General motivation Evaluation of univariate polynomials with floating point coefficients: the evaluation of a polynomial suffers from rounding errors example : in the neighborhood of a multiple root How to improve the accuracy of the Horner algorithm? Here we present : a compensated Horner algorithm that improves the accuracy. two results to ensure faithful polynomial evaluation with this algorithm. IEEE-754 fp arithmetic, rounding to the nearest, no over/underflow. Ph. Langlois (Université de Perpignan) Faithful Horner Algorithm 18 July / 16

4 Outline 1 Accuracy of the Horner algorithm 2 Compensated Horner algorithm 3 Is the result faithfully rounded for small condition numbers? 4 Practical efficiency 5 Conclusion Ph. Langlois (Université de Perpignan) Faithful Horner Algorithm 18 July / 16

5 Accuracy of the Horner algorithm We consider the polynomial n p(x) = a i x i, i=0 with a i F, x F Algorithm (Horner algorithm) function r 0 = Horner (p, x) r n = a n for i = n 1 : 1 : 0 r i = r i+1 x a i end Ph. Langlois (Université de Perpignan) Faithful Horner Algorithm 18 July / 16

6 Accuracy of the Horner algorithm We consider the polynomial n p(x) = a i x i, i=0 with a i F, x F Algorithm (Horner algorithm) function r 0 = Horner (p, x) r n = a n for i = n 1 : 1 : 0 r i = r i+1 x a i end Relative accuracy of the evaluation with the Horner algorithm: p(x) p(x) p(x) 2nu cond(p, x) + O(u 2 ) u is the computing precision = the unit roundoff : IEEE-754 double, 53-bits mantissa, rounding to the nearest u = cond(p, x) denotes the condition number of the evaluation: ai x i cond(p, x) = 1. p(x) Ph. Langlois (Université de Perpignan) Faithful Horner Algorithm 18 July / 16

7 Accuracy condition number of the problem u Accuracy of polynomial evaluation with the Horner scheme [n=50] 1 relative forward error Horner 2nu cond(p, x) + O(u 2 ) u condition number 1/u Ph. Langlois (Université de Perpignan) Faithful Horner Algorithm 18 July / 16

8 Accuracy condition number of the problem u Accuracy of polynomial evaluation with the Horner scheme [n=50] 1 relative forward error Horner 2nu cond(p, x) + O(u 2 ) u condition number 1/u How can we obtain more accuracy for polynomial evaluation? Ph. Langlois (Université de Perpignan) Faithful Horner Algorithm 18 July / 16

9 Compensated algorithms & error-free transformations Compensated algorithms: Algorithms that correct the generated rounding errors. Many examples: Kahan s compensated summation (65), Priest s doubly compensated summation (92), Ogita-Rump-Oishi (SISC 05)... The rounding errors are computed thanks to error-free transformations. Error-Free Transformations (EFT) are algorithms to compute the rounding errors at the current working precision. (x, y) = 2Prod (a, b) 17 flop Dekker (71) such that a b = x + y and x = a b + (x, y) = 2Sum (a, b) 6 flop Knuth (74) such that a + b = x + y and x = a b with a, b, x, y F. Ph. Langlois (Université de Perpignan) Faithful Horner Algorithm 18 July / 16

10 EFT for the Horner algorithm Consider p(x) = n i=0 a ix i of degree n, a i, x F. Algorithm (Horner) function r 0 = Horner (p, x) r n = a n for i = n 1 : 1 : 0 p i = r i+1 x % error π i F r i = p i a i % error σ i F end Let us define two polynomials p π and p σ such that: n 1 n 1 p π (x) = π i x i and p σ (x) = σ i x i i=0 i=0 Ph. Langlois (Université de Perpignan) Faithful Horner Algorithm 18 July / 16

11 EFT for the Horner algorithm Consider p(x) = n i=0 a ix i of degree n, a i, x F. Algorithm (Horner) function r 0 = Horner (p, x) r n = a n for i = n 1 : 1 : 0 p i = r i+1 x % error π i F r i = p i a i % error σ i F end Let us define two polynomials p π and p σ such that: n 1 n 1 p π (x) = π i x i and p σ (x) = σ i x i i=0 i=0 Theorem (EFT for Horner algorithm) p(x) = Horner (p, x) + (p π + p σ )(x). }{{}}{{}}{{} exact value F forward error Ph. Langlois (Université de Perpignan) Faithful Horner Algorithm 18 July / 16

12 EFT for the Horner algorithm Consider p(x) = n i=0 a ix i of degree n, a i, x F. Algorithm (Horner) function r 0 = Horner (p, x) r n = a n for i = n 1 : 1 : 0 p i = r i+1 x % error π i F r i = p i a i % error σ i F end Theorem (EFT for Horner algorithm) Algorithm (EFT for Horner) function [r 0, p π, p σ ] = EFTHorner (p, x) r n = a n for i = n 1 : 1 : 0 [p i, π i ] = 2Prod (r i+1, x) [r i, σ i ] = 2Sum (p i, a i ) p π [i] = π i p σ [i] = σ i end p(x) = Horner (p, x) + (p π + p σ )(x). }{{}}{{}}{{} exact value F forward error Ph. Langlois (Université de Perpignan) Faithful Horner Algorithm 18 July / 16

13 Compensated Horner algorithm (p π + p σ )(x) is exactly the forward error affecting Horner (p, x). we compute an approximate of (p π + p σ )(x) as a correcting term. Algorithm (Compensated Horner algorithm) function r = CompHorner (p, x) [ r, p π, p σ ] = EFTHorner (p, x) % r = Horner (p, x) ĉ = Horner (p π p σ, x) r = r ĉ Theorem Given p a polynomial with floating point coefficients, and x F, CompHorner (p, x) p(x) p(x) u + (2nu) 2 cond(p, x) + O(u 3 ). Ph. Langlois (Université de Perpignan) Faithful Horner Algorithm 18 July / 16

14 Accuracy of the result u + condition number u 2. 1 Accuracy of polynomial evaluation with the compensated Horner scheme [n=50] 10-2 relative forward error nu cond(p, x) + O(u 2 ) u + (2nu) 2 cond(p, x) + O(u 3 ) u /u 1/u condition number Ph. Langlois (Université de Perpignan) Faithful Horner Algorithm 18 July / 16

15 Accuracy of the result u + condition number u 2. 1 Accuracy of polynomial evaluation with the compensated Horner scheme [n=50] 10-2 relative forward error nu cond(p, x) + O(u 2 ) u + (2nu) 2 cond(p, x) + O(u 3 ) u /u 1/u condition number Is the result faithfully rounded for small condition numbers? Ph. Langlois (Université de Perpignan) Faithful Horner Algorithm 18 July / 16

16 Faithful rounding Definition A floating point number x is said to be a faithful rounding of a real number x if either x = x, or x is one of the two floating point neighbours of x. x x Ph. Langlois (Université de Perpignan) Faithful Horner Algorithm 18 July / 16

17 Faithful rounding Definition A floating point number x is said to be a faithful rounding of a real number x if either x = x, or x is one of the two floating point neighbours of x. x x The worst case accuracy bound for CompHorner, CompHorner (p, x) p(x) p(x) is too large for reasoning about faithful rounding. u + (2nu) 2 cond(p, x) + O(u 3 ) }{{} >u Ph. Langlois (Université de Perpignan) Faithful Horner Algorithm 18 July / 16

18 A sufficient condition for faithful rounding We recall: Lemma ĉ c is the error in the computed correcting term ĉ F r = CompHorner (p, x) is the compensated result. ĉ c < u r r is a faithful rounding of p(x). 2 (see Lemma 2.5 in Accurate floating point summation, Rump, Ogita and Oishi, 2005) Using this lemma, we present two results: an a priori upper bound on cond(p, x) to ensure faithful rounding, an a posteriori (running time) test for faithful rounding. Ph. Langlois (Université de Perpignan) Faithful Horner Algorithm 18 July / 16

19 A priori upper bound on cond(p, x) Theorem cond(p, x) < 1 u u 2 + u γ 2 2n ĉ c < u 2 r CompHorner (p, x) is a faithful rounding of p(x). An upper bound easier to interpret: cond(p, x) 1 16n 2 1 u. We observed roughly cond(p, x) 1/u faithful rounding the upper bound on cond(p, x) may be a bit pessimistic. Example: if we consider a polynomial p of degre n = 50, faithful rounding is ensured as long as cond(p, x) Ph. Langlois (Université de Perpignan) Faithful Horner Algorithm 18 July / 16

20 An a posteriori test for faithful rounding A bound on the error ĉ c in the computed correcting term ĉ: ( ) γ2n 1 Horner ( p π p σ, x ) c ĉ fl =: β 1 2(n + 1)u Bound satisfied when computed at running time in fp arithmetic. Then, β < u 2 r c ĉ < u 2 r r is a faithful rounding of p(x). This is again a sufficient condition : if this test is satifised, this ensure faithful rounding, else, the compensated may be faithfully rounded or not. Ph. Langlois (Université de Perpignan) Faithful Horner Algorithm 18 July / 16

21 A priori ( ) and a posteriori ( ) conditions 1 Accuracy of polynomial evaluation with the compensated Horner scheme [n=50] 10-2 relative forward error A priori bound on cond(p, x) u + (2nu) 2 cond(p, x) + O(u 3 ) u /u 1/u condition number Ph. Langlois (Université de Perpignan) Faithful Horner Algorithm 18 July / 16

22 A priori ( ) and a posteriori ( ) conditions 1 Accuracy of polynomial evaluation with the compensated Horner scheme [n=50] 10-2 relative forward error A priori bound on cond(p, x) u + (2nu) 2 cond(p, x) + O(u 3 ) u /u 1/u condition number Ph. Langlois (Université de Perpignan) Faithful Horner Algorithm 18 July / 16

23 Overhead to obtain more accuracy Practical overheads compared to the classic Horner algorithm 1 : CompHorner Horner DDHorner Horner CompHornerIsFaith Horner Pentium 4, 3.00 GHz GCC (sse fp unit) ICC Athlon 64, 2.00 GHz GCC Itanium 2, 1.4 GHz GCC ICC CompHorner = Compensated Horner algorithm DDHorner = Horner algorithm + double-double (Bailey s library) CompHornerIsFaith = CompHorner + test for faithful rounding. CompHorner runs a least two times faster than DDHorner. 1 Average ratios for polynomials of degree 5 to 200. Ph. Langlois (Université de Perpignan) Faithful Horner Algorithm 18 July / 16

24 Conclusion Compensated Horner algorithm: as accurate as the Horner algorithm performed in doubled working precision, very efficient compared to the double-double alternative. Faithful polynomial evaluation with the compensated Horner algorithm: an a priori upper bound on the condition number to ensure faithful rounding, an a posteriori test to check if the computed result is faithfully rounded. Future works: cases of subnormal results, to provide an adaptative evaluation algorithm to ensure faithful rounding for polynomials with arbitrary condition number. Ph. Langlois (Université de Perpignan) Faithful Horner Algorithm 18 July / 16

25 Ph. Langlois (Université de Perpignan) Faithful Horner Algorithm 18 July / 16

26 Overhead to obtain more accuracy (Previous measures) Some practical ratios (running times 2 ): CompHorner Horner DDHorner Horner CompHornerIsFaith Horner Pentium 4, 3.00 GHz GCC ICC Athlon 64, 2.00 GHz GCC Itanium 2, 1.4 GHz GCC ICC CompHorner = Compensated Horner algorithm DDHorner = Horner algorithm + double-double (Bailey s library) CompHornerIsFaith = CompHorner + this test for faithful rounding. 2 Average ratios for polynomials of degree 5 to 200. Ph. Langlois (Université de Perpignan) Faithful Horner Algorithm 18 July / 16

27 Practical efficiency How does the more accurate algorithms compare to each other? CompHornerIsFaith CompHorner DDHorner CompHorner DDHorner CompHornerIsFaith Pentium 4, 3.00 GHz GCC ICC Athlon 64, 2.00 GHz GCC Itanium 2, 1.4 GHz GCC ICC Ph. Langlois (Université de Perpignan) Faithful Horner Algorithm 18 July / 16

28 Faithful rounding Definition A floating point number x is said to be a faithful rounding of a real number x if x < x < x +. x x x x + The error bound CompHorner (p, x) p(x) p(x) is too large for reasoning about faithful rounding. u + γ 2 2n }{{} 2n 2 u 2 cond(p, x) Ph. Langlois (Université de Perpignan) Faithful Horner Algorithm 18 July / 16

29 A sufficient condition for faithful rounding We know that: the compensated result is r = r ĉ, the exact result is p(x) = r + c = ( r + ĉ) + (c ĉ). What condition on c ĉ to ensure that r < p(x) < r +. r r r + r + ĉ p(x) = ( r + ĉ) + (c ĉ) c ĉ c ĉ Ph. Langlois (Université de Perpignan) Faithful Horner Algorithm 18 July / 16

30 A sufficient condition for faithful rounding r is not a power of 2: If r = r ĉ and ĉ c < u 2 r then r is a faithful rounding of ( r + ĉ) + (c ĉ) = p(x). u r u r 2 r r r + r + ĉ p(x) = ( r + ĉ) + (c ĉ) Ph. Langlois (Université de Perpignan) Faithful Horner Algorithm 18 July / 16

31 A sufficient condition for faithful rounding r is a power of 2: If r = r ĉ and ĉ c < u 2 r then r is a faithful rounding of ( r + ĉ) + (c ĉ) = p(x). u r u u r r 2 2 r r = 2 k r + r + ĉ p(x) = ( r + ĉ) + (c ĉ) Ph. Langlois (Université de Perpignan) Faithful Horner Algorithm 18 July / 16

4ccurate 4lgorithms in Floating Point 4rithmetic

4ccurate 4lgorithms in Floating Point 4rithmetic 4ccurate 4lgorithms in Floating Point 4rithmetic Philippe LANGLOIS 1 1 DALI Research Team, University of Perpignan, France SCAN 2006 at Duisburg, Germany, 26-29 September 2006 Philippe LANGLOIS (UPVD)

More information

How to Ensure a Faithful Polynomial Evaluation with the Compensated Horner Algorithm

How 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 information

Accurate polynomial evaluation in floating point arithmetic

Accurate 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 information

Accurate Solution of Triangular Linear System

Accurate Solution of Triangular Linear System SCAN 2008 Sep. 29 - Oct. 3, 2008, at El Paso, TX, USA Accurate Solution of Triangular Linear System Philippe Langlois DALI at University of Perpignan France Nicolas Louvet INRIA and LIP at ENS Lyon France

More information

Algorithms for Accurate, Validated and Fast Polynomial Evaluation

Algorithms for Accurate, Validated and Fast Polynomial Evaluation Algorithms for Accurate, Validated and Fast Polynomial Evaluation Stef Graillat, Philippe Langlois, Nicolas Louvet Abstract: We survey a class of algorithms to evaluate polynomials with oating point coecients

More information

Solving Triangular Systems More Accurately and Efficiently

Solving Triangular Systems More Accurately and Efficiently 17th IMACS World Congress, July 11-15, 2005, Paris, France Scientific Computation, Applied Mathematics and Simulation Solving Triangular Systems More Accurately and Efficiently Philippe LANGLOIS and Nicolas

More information

Compensated Horner Scheme

Compensated Horner Scheme Compensated Horner Scheme S. Graillat 1, Philippe Langlois 1, Nicolas Louvet 1 DALI-LP2A Laboratory. Université de Perpignan Via Domitia. firstname.lastname@univ-perp.fr, http://webdali.univ-perp.fr Abstract.

More information

An accurate algorithm for evaluating rational functions

An accurate algorithm for evaluating rational functions An accurate algorithm for evaluating rational functions Stef Graillat To cite this version: Stef Graillat. An accurate algorithm for evaluating rational functions. 2017. HAL Id: hal-01578486

More information

Compensated Horner scheme in complex floating point arithmetic

Compensated Horner scheme in complex floating point arithmetic Compensated Horner scheme in complex floating point arithmetic Stef Graillat, Valérie Ménissier-Morain UPMC Univ Paris 06, UMR 7606, LIP6 4 place Jussieu, F-75252, Paris cedex 05, France stef.graillat@lip6.fr,valerie.menissier-morain@lip6.fr

More information

Improving the Compensated Horner Scheme with a Fused Multiply and Add

Improving the Compensated Horner Scheme with a Fused Multiply and Add Équipe de Recherche DALI Laboratoire LP2A, EA 3679 Université de Perpignan Via Domitia Improving the Compensated Horner Scheme with a Fused Multiply and Add S. Graillat, Ph. Langlois, N. Louvet DALI-LP2A

More information

Accurate Floating Point Product and Exponentiation

Accurate Floating Point Product and Exponentiation Accurate Floating Point Product and Exponentiation Stef Graillat To cite this version: Stef Graillat. Accurate Floating Point Product and Exponentiation. IEEE Transactions on Computers, Institute of Electrical

More information

Computation of dot products in finite fields with floating-point arithmetic

Computation 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 information

Implementation of float float operators on graphic hardware

Implementation of float float operators on graphic hardware Implementation of float float operators on graphic hardware Guillaume Da Graça David Defour DALI, Université de Perpignan Outline Why GPU? Floating point arithmetic on GPU Float float format Problem &

More information

Floating Point Arithmetic and Rounding Error Analysis

Floating Point Arithmetic and Rounding Error Analysis Floating Point Arithmetic and Rounding Error Analysis Claude-Pierre Jeannerod Nathalie Revol Inria LIP, ENS de Lyon 2 Context Starting point: How do numerical algorithms behave in nite precision arithmetic?

More information

Computing Time for Summation Algorithm: Less Hazard and More Scientific Research

Computing Time for Summation Algorithm: Less Hazard and More Scientific Research Computing Time for Summation Algorithm: Less Hazard and More Scientific Research Bernard Goossens, Philippe Langlois, David Parello, Kathy Porada To cite this version: Bernard Goossens, Philippe Langlois,

More information

Adaptive and Efficient Algorithm for 2D Orientation Problem

Adaptive and Efficient Algorithm for 2D Orientation Problem Japan J. Indust. Appl. Math., 26 (2009), 215 231 Area 2 Adaptive and Efficient Algorithm for 2D Orientation Problem Katsuhisa Ozaki, Takeshi Ogita, Siegfried M. Rump and Shin ichi Oishi Research Institute

More information

ACCURATE FLOATING-POINT SUMMATION PART II: SIGN, K-FOLD FAITHFUL AND ROUNDING TO NEAREST

ACCURATE FLOATING-POINT SUMMATION PART II: SIGN, K-FOLD FAITHFUL AND ROUNDING TO NEAREST submitted for publication in SISC, November 13, 2005, revised April 13, 2007 and April 15, 2008, accepted August 21, 2008; appeared SIAM J. Sci. Comput. Vol. 31, Issue 2, pp. 1269-1302 (2008) ACCURATE

More information

Computation of the error functions erf and erfc in arbitrary precision with correct rounding

Computation of the error functions erf and erfc in arbitrary precision with correct rounding Computation of the error functions erf and erfc in arbitrary precision with correct rounding Sylvain Chevillard Arenaire, LIP, ENS-Lyon, France Sylvain.Chevillard@ens-lyon.fr Nathalie Revol INRIA, Arenaire,

More information

Automatic Verified Numerical Computations for Linear Systems

Automatic Verified Numerical Computations for Linear Systems Automatic Verified Numerical Computations for Linear Systems Katsuhisa Ozaki (Shibaura Institute of Technology) joint work with Takeshi Ogita (Tokyo Woman s Christian University) Shin ichi Oishi (Waseda

More information

Convergence of Rump s Method for Inverting Arbitrarily Ill-Conditioned Matrices

Convergence of Rump s Method for Inverting Arbitrarily Ill-Conditioned Matrices published in J. Comput. Appl. Math., 205(1):533 544, 2007 Convergence of Rump s Method for Inverting Arbitrarily Ill-Conditioned Matrices Shin ichi Oishi a,b Kunio Tanabe a Takeshi Ogita b,a Siegfried

More information

Homework 2 Foundations of Computational Math 1 Fall 2018

Homework 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 information

On various ways to split a floating-point number

On 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 information

Computer 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. 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 information

Exact Determinant of Integer Matrices

Exact Determinant of Integer Matrices Takeshi Ogita Department of Mathematical Sciences, Tokyo Woman s Christian University Tokyo 167-8585, Japan, ogita@lab.twcu.ac.jp Abstract. This paper is concerned with the numerical computation of the

More information

ACCURATE SUM AND DOT PRODUCT

ACCURATE SUM AND DOT PRODUCT ACCURATE SUM AND DOT PRODUCT TAKESHI OGITA, SIEGFRIED M. RUMP, AND SHIN ICHI OISHI Abstract. Algorithms for summation and dot product of floating point numbers are presented which are fast in terms of

More information

ACM 106a: Lecture 1 Agenda

ACM 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 information

Reproducible, Accurately Rounded and Efficient BLAS

Reproducible, Accurately Rounded and Efficient BLAS Reproducible, Accurately Rounded and Efficient BLAS Chemseddine Chohra, Philippe Langlois, David Parello To cite this version: Chemseddine Chohra, Philippe Langlois, David Parello. Reproducible, Accurately

More information

The Classical Relative Error Bounds for Computing a2 + b 2 and c/ a 2 + b 2 in Binary Floating-Point Arithmetic are Asymptotically Optimal

The 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 information

Parallel Reproducible Summation

Parallel 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 information

Some issues related to double rounding

Some issues related to double rounding Noname manuscript No. will be inserted by the editor) Some issues related to double rounding Érik Martin-Dorel Guillaume Melquiond Jean-Michel Muller Received: date / Accepted: date Abstract Double rounding

More information

1 Floating point arithmetic

1 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 information

Computing correctly rounded logarithms with fixed-point operations. Julien Le Maire, Florent de Dinechin, Jean-Michel Muller and Nicolas Brunie

Computing correctly rounded logarithms with fixed-point operations. Julien Le Maire, Florent de Dinechin, Jean-Michel Muller and Nicolas Brunie Computing correctly rounded logarithms with fixed-point operations Julien Le Maire, Florent de Dinechin, Jean-Michel Muller and Nicolas Brunie Outline Introduction and context Algorithm Results and comparisons

More information

Towards Fast, Accurate and Reproducible LU Factorization

Towards Fast, Accurate and Reproducible LU Factorization Towards Fast, Accurate and Reproducible LU Factorization Roman Iakymchuk 1, David Defour 2, and Stef Graillat 3 1 KTH Royal Institute of Technology, CSC, CST/PDC 2 Université de Perpignan, DALI LIRMM 3

More information

Automated design of floating-point logarithm functions on integer processors

Automated design of floating-point logarithm functions on integer processors 23rd IEEE Symposium on Computer Arithmetic Santa Clara, CA, USA, 10-13 July 2016 Automated design of floating-point logarithm functions on integer processors Guillaume Revy (presented by Florent de Dinechin)

More information

Floating-point Computation

Floating-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 information

Chapter 1 Divide and Conquer Algorithm Theory WS 2016/17 Fabian Kuhn

Chapter 1 Divide and Conquer Algorithm Theory WS 2016/17 Fabian Kuhn Chapter 1 Divide and Conquer Algorithm Theory WS 2016/17 Fabian Kuhn Formulation of the D&C principle Divide-and-conquer method for solving a problem instance of size n: 1. Divide n c: Solve the problem

More information

Mathematical preliminaries and error analysis

Mathematical 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 information

Program 1 Foundations of Computational Math 1 Fall 2018

Program 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 information

1.1 COMPUTER REPRESENTATION OF NUM- BERS, REPRESENTATION ERRORS

1.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 information

Verification methods for linear systems using ufp estimation with rounding-to-nearest

Verification methods for linear systems using ufp estimation with rounding-to-nearest NOLTA, IEICE Paper Verification methods for linear systems using ufp estimation with rounding-to-nearest Yusuke Morikura 1a), Katsuhisa Ozaki 2,4, and Shin ichi Oishi 3,4 1 Graduate School of Fundamental

More information

FLOATING POINT ARITHMETHIC - ERROR ANALYSIS

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 Roundoff errors and floating-point arithmetic

More information

Q-adic Transform revisited

Q-adic Transform revisited Q-adic Transform revisited Jean-Guillaume Dumas To cite this version: Jean-Guillaume Dumas. Q-adic Transform revisited. 2007. HAL Id: hal-00173894 https://hal.archives-ouvertes.fr/hal-00173894v3

More information

MANY numerical problems in dynamical systems

MANY numerical problems in dynamical systems IEEE TRANSACTIONS ON COMPUTERS, VOL., 201X 1 Arithmetic algorithms for extended precision using floating-point expansions Mioara Joldeş, Olivier Marty, Jean-Michel Muller and Valentina Popescu Abstract

More information

Tight and rigourous error bounds for basic building blocks of double-word arithmetic. Mioara Joldes, Jean-Michel Muller, Valentina Popescu

Tight and rigourous error bounds for basic building blocks of double-word arithmetic. Mioara Joldes, Jean-Michel Muller, Valentina Popescu Tight and rigourous error bounds for basic building blocks of double-word arithmetic Mioara Joldes, Jean-Michel Muller, Valentina Popescu SCAN - September 2016 AMPAR CudA Multiple Precision ARithmetic

More information

CME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 5. Ax = b.

CME 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 information

INVERSION OF EXTREMELY ILL-CONDITIONED MATRICES IN FLOATING-POINT

INVERSION OF EXTREMELY ILL-CONDITIONED MATRICES IN FLOATING-POINT submitted for publication in JJIAM, March 15, 28 INVERSION OF EXTREMELY ILL-CONDITIONED MATRICES IN FLOATING-POINT SIEGFRIED M. RUMP Abstract. Let an n n matrix A of floating-point numbers in some format

More information

ERROR ESTIMATION OF FLOATING-POINT SUMMATION AND DOT PRODUCT

ERROR ESTIMATION OF FLOATING-POINT SUMMATION AND DOT PRODUCT accepted for publication in BIT, May 18, 2011. ERROR ESTIMATION OF FLOATING-POINT SUMMATION AND DOT PRODUCT SIEGFRIED M. RUMP Abstract. We improve the well-known Wilkinson-type estimates for the error

More information

MATH ASSIGNMENT 03 SOLUTIONS

MATH 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 information

Lecture 7. Floating point arithmetic and stability

Lecture 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 information

ECS 231 Computer Arithmetic 1 / 27

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 information

The Euclidean Division Implemented with a Floating-Point Multiplication and a Floor

The 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 information

Topic 17. Analysis of Algorithms

Topic 17. Analysis of Algorithms Topic 17 Analysis of Algorithms Analysis of Algorithms- Review Efficiency of an algorithm can be measured in terms of : Time complexity: a measure of the amount of time required to execute an algorithm

More information

Newton-Raphson Algorithms for Floating-Point Division Using an FMA

Newton-Raphson Algorithms for Floating-Point Division Using an FMA Newton-Raphson Algorithms for Floating-Point Division Using an FMA Nicolas Louvet, Jean-Michel Muller, Adrien Panhaleux Abstract Since the introduction of the Fused Multiply and Add (FMA) in the IEEE-754-2008

More information

FLOATING POINT ARITHMETHIC - ERROR ANALYSIS

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 information

Getting tight error bounds in floating-point arithmetic: illustration with complex functions, and the real x n function

Getting tight error bounds in floating-point arithmetic: illustration with complex functions, and the real x n function Getting tight error bounds in floating-point arithmetic: illustration with complex functions, and the real x n function Jean-Michel Muller collaborators: S. Graillat, C.-P. Jeannerod, N. Louvet V. Lefèvre

More information

Fast and accurate Bessel function computation

Fast and accurate Bessel function computation 0 Fast and accurate Bessel function computation John Harrison, Intel Corporation ARITH-19 Portland, OR Tue 9th June 2009 (11:00 11:30) 1 Bessel functions and their computation Bessel functions are certain

More information

Numerical Analysis. Yutian LI. 2018/19 Term 1 CUHKSZ. Yutian LI (CUHKSZ) Numerical Analysis 2018/19 1 / 41

Numerical 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 information

Optimizing the Representation of Intervals

Optimizing the Representation of Intervals Optimizing the Representation of Intervals Javier D. Bruguera University of Santiago de Compostela, Spain Numerical Sofware: Design, Analysis and Verification Santander, Spain, July 4-6 2012 Contents 1

More information

Round-off Error Analysis of Explicit One-Step Numerical Integration Methods

Round-off Error Analysis of Explicit One-Step Numerical Integration Methods Round-off Error Analysis of Explicit One-Step Numerical Integration Methods 24th IEEE Symposium on Computer Arithmetic Sylvie Boldo 1 Florian Faissole 1 Alexandre Chapoutot 2 1 Inria - LRI, Univ. Paris-Sud

More information

ROUNDOFF ERRORS; BACKWARD STABILITY

ROUNDOFF 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 information

Lecture 2 MODES OF NUMERICAL COMPUTATION

Lecture 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 information

Faithfully Rounded Floating-point Computations

Faithfully Rounded Floating-point Computations 1 Faithfully Rounded Floating-point Computations MARKO LANGE, Waseda University SIEGFRIED M. RUMP, Hamburg University of Technology We present a pair arithmetic for the four basic operations and square

More information

How do computers represent numbers?

How 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 information

Numerical Program Optimization by Automatic Improvement of the Accuracy of Computations. Nasrine Damouche* and Matthieu Martel

Numerical Program Optimization by Automatic Improvement of the Accuracy of Computations. Nasrine Damouche* and Matthieu Martel Int. J. of Intelligent Engineering Informatics, Vol. x, No. x, 1 26 1 Numerical Program Optimization by Automatic Improvement of the Accuracy of Computations Nasrine Damouche* and Matthieu Martel Université

More information

Subquadratic space complexity multiplier for a class of binary fields using Toeplitz matrix approach

Subquadratic space complexity multiplier for a class of binary fields using Toeplitz matrix approach Subquadratic space complexity multiplier for a class of binary fields using Toeplitz matrix approach M A Hasan 1 and C Negre 2 1 ECE Department and CACR, University of Waterloo, Ontario, Canada 2 Team

More information

Floating 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 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 information

Effect of round-off errors on the. Accuracy of randomized algorithms

Effect of round-off errors on the. Accuracy of randomized algorithms Effect of round-off errors on the accuracy of randomized algorithms ÉLIAUS-PROMES (UPR 8521 CNRS) Perpignan France marc.daumas@univ-perp.fr Outline 1 2 3 4 5 Characterize the accuracy of the result of

More information

Notes for Chapter 1 of. Scientific Computing with Case Studies

Notes 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 information

PARALLEL MULTIPLICATION IN F 2

PARALLEL MULTIPLICATION IN F 2 PARALLEL MULTIPLICATION IN F 2 n USING CONDENSED MATRIX REPRESENTATION Christophe Negre Équipe DALI, LP2A, Université de Perpignan avenue P Alduy, 66 000 Perpignan, France christophenegre@univ-perpfr Keywords:

More information

Accurate Multiple-Precision Gauss-Legendre Quadrature

Accurate Multiple-Precision Gauss-Legendre Quadrature Accurate Multiple-Precision Gauss-Legendre Quadrature Laurent Fousse Université Henri-Poincaré Nancy 1 laurent@komite.net Abstract Numerical integration is an operation that is frequently available in

More information

Short Division of Long Integers. (joint work with David Harvey)

Short Division of Long Integers. (joint work with David Harvey) Short Division of Long Integers (joint work with David Harvey) Paul Zimmermann October 6, 2011 The problem to be solved Divide efficiently a p-bit floating-point number by another p-bit f-p number in the

More information

Arithmetic and Error. How does error arise? How does error arise? Notes for Part 1 of CMSC 460

Arithmetic 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 information

On the computation of the reciprocal of floating point expansions using an adapted Newton-Raphson iteration

On the computation of the reciprocal of floating point expansions using an adapted Newton-Raphson iteration On the computation of the reciprocal of floating point expansions using an adapted Newton-Raphson iteration Mioara Joldes, Valentina Popescu, Jean-Michel Muller ASAP 2014 1 / 10 Motivation Numerical problems

More information

Faster and Tighter Evaluation of a Polynomial Range Through SIMD Interval Arithmetic

Faster and Tighter Evaluation of a Polynomial Range Through SIMD Interval Arithmetic Faster and Tighter Evaluation of a Polynomial Range Through SIMD Interval Arithmetic Frédéric Goualard Université de Nantes Laboratoire d Informatique de Nantes-Atlantique, UMR CNRS 6241 Faster and Tighter

More information

Numerical Methods - Preliminaries

Numerical 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 information

Midterm Review. Igor Yanovsky (Math 151A TA)

Midterm Review. Igor Yanovsky (Math 151A TA) Midterm Review Igor Yanovsky (Math 5A TA) Root-Finding Methods Rootfinding methods are designed to find a zero of a function f, that is, to find a value of x such that f(x) =0 Bisection Method To apply

More information

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

PowerPoints 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 information

Formal Verification of Mathematical Algorithms

Formal Verification of Mathematical Algorithms Formal Verification of Mathematical Algorithms 1 Formal Verification of Mathematical Algorithms John Harrison Intel Corporation The cost of bugs Formal verification Levels of verification HOL Light Formalizing

More information

A new multiplication algorithm for extended precision using floating-point expansions. Valentina Popescu, Jean-Michel Muller,Ping Tak Peter Tang

A new multiplication algorithm for extended precision using floating-point expansions. Valentina Popescu, Jean-Michel Muller,Ping Tak Peter Tang A new multiplication algorithm for extended precision using floating-point expansions Valentina Popescu, Jean-Michel Muller,Ping Tak Peter Tang ARITH 23 July 2016 AMPAR CudA Multiple Precision ARithmetic

More information

Extended precision with a rounding mode toward zero environment. Application on the CELL processor

Extended precision with a rounding mode toward zero environment. Application on the CELL processor Extended precision with a rounding mode toward zero environment. Application on the CELL processor Hong Diep Nguyen (hong.diep.nguyen@ens-lyon.fr), Stef Graillat (stef.graillat@lip6.fr), Jean-Luc Lamotte

More information

Parallel Polynomial Evaluation

Parallel Polynomial Evaluation Parallel Polynomial Evaluation Jan Verschelde joint work with Genady Yoffe University of Illinois at Chicago Department of Mathematics, Statistics, and Computer Science http://www.math.uic.edu/ jan jan@math.uic.edu

More information

1 Finding and fixing floating point problems

1 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 information

Transformation of a PID Controller for Numerical Accuracy

Transformation of a PID Controller for Numerical Accuracy Replace this file with prentcsmacro.sty for your meeting, or with entcsmacro.sty for your meeting. Both can be found at the ENTCS Macro Home Page. Transformation of a PID Controller for Numerical Accuracy

More information

Chapter 1 Error Analysis

Chapter 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 information

Can You Count on Your Computer?

Can You Count on Your Computer? Can You Count on Your Computer? Professor Nick Higham School of Mathematics University of Manchester higham@ma.man.ac.uk http://www.ma.man.ac.uk/~higham/ p. 1/33 p. 2/33 Counting to Six I asked my computer

More information

Formal verification of IA-64 division algorithms

Formal 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 information

Chapter 4 Number Representations

Chapter 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 information

Computing Machine-Efficient Polynomial Approximations

Computing Machine-Efficient Polynomial Approximations Computing Machine-Efficient Polynomial Approximations NICOLAS BRISEBARRE Université J. Monnet, St-Étienne and LIP-E.N.S. Lyon JEAN-MICHEL MULLER CNRS, LIP-ENS Lyon and ARNAUD TISSERAND INRIA, LIP-ENS Lyon

More information

Optimizing Scientific Libraries for the Itanium

Optimizing Scientific Libraries for the Itanium 0 Optimizing Scientific Libraries for the Itanium John Harrison Intel Corporation Gelato Federation Meeting, HP Cupertino May 25, 2005 1 Quick summary Intel supplies drop-in replacement versions of common

More information

CR-LIBM A library of correctly rounded elementary functions in double-precision

CR-LIBM A library of correctly rounded elementary functions in double-precision CR-LIBM A library of correctly rounded elementary functions in double-precision Catherine Daramy-Loirat, David Defour, Florent De Dinechin, Matthieu Gallet, Nicolas Gast, Christoph Lauter, Jean-Michel

More information

Jim Lambers MAT 610 Summer Session Lecture 2 Notes

Jim 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 information

Numerics and Error Analysis

Numerics 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 information

CS 395T Computational Learning Theory. Scribe: Rahul Suri

CS 395T Computational Learning Theory. Scribe: Rahul Suri CS 395T Computational Learning Theory Lecture 6: September 19, 007 Lecturer: Adam Klivans Scribe: Rahul Suri 6.1 Overview In Lecture 5, we showed that for any DNF formula f with n variables and s terms

More information

Automating the Verification of Floating-point Algorithms

Automating the Verification of Floating-point Algorithms Introduction Interval+Error Advanced Gappa Conclusion Automating the Verification of Floating-point Algorithms Guillaume Melquiond Inria Saclay Île-de-France LRI, Université Paris Sud, CNRS 2014-07-18

More information

An Introduction to the Quality of Computed Solutions 1

An Introduction to the Quality of Computed Solutions 1 An Introduction to the Quality of Computed Solutions 1 Sven Hammarling The Numerical Algorithms Group Ltd Wilkinson House Jordan Hill Road Oxford, OX2 8DR, UK sven@nag.co.uk October 12, 2005 1 Based on

More information

GPU acceleration of Newton s method for large systems of polynomial equations in double double and quad double arithmetic

GPU acceleration of Newton s method for large systems of polynomial equations in double double and quad double arithmetic GPU acceleration of Newton s method for large systems of polynomial equations in double double and quad double arithmetic Jan Verschelde joint work with Xiangcheng Yu University of Illinois at Chicago

More information

Tunable Floating-Point for Energy Efficient Accelerators

Tunable Floating-Point for Energy Efficient Accelerators Tunable Floating-Point for Energy Efficient Accelerators Alberto Nannarelli DTU Compute, Technical University of Denmark 25 th IEEE Symposium on Computer Arithmetic A. Nannarelli (DTU Compute) Tunable

More information

An Introduction to Differential Algebra

An Introduction to Differential Algebra An Introduction to Differential Algebra Alexander Wittig1, P. Di Lizia, R. Armellin, et al. 1 ESA Advanced Concepts Team (TEC-SF) SRL, Milan Dinamica Outline 1 Overview Five Views of Differential Algebra

More information

Round-off Errors and Computer Arithmetic - (1.2)

Round-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 information