Contributions to Floating-Point Arithmetic : Coding and Correct Rounding of Algebraic Functions Adrien Panhaleux

Contributions to Floating-Point Arithmetic : Coding and Correct Rounding of Algebraic Functions Adrien Panhaleux

Contributions to floating-point arithmetic : Coding and correct rounding of algebraic functions Adrien Panhaleux To cite this version: Adrien Panhaleux. Contributions to floating-point arithmetic : Coding and correct rounding ofalge- braic functions. Other [cs.OH]. Ecole normale supérieure de lyon - ENS LYON, 2012. English. NNT : 2012ENSL0721. tel-00744373 HAL Id: tel-00744373 https://tel.archives-ouvertes.fr/tel-00744373 Submitted on 23 Oct 2012 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Ecole´ Normale Superieure´ de Lyon Laboratoire de l’Informatique du Parall´elisme THESE` dont la soutenance est pr´evuele 27 juin 2012 par Adrien Panhaleux en vue de l’obtention du grade de Docteur de l’Ecole´ Normale Sup´erieure de Lyon – Universit´ede Lyon sp´ecialit´e: Informatique au titre de l’Ecole´ Doctorale Informatique et Math´ematiques de Lyon Contributions `al’arithm´etique flottante : codages et arrondi correct de fonctions alg´ebriques Commission d’examen: Dominique Michelucci Professeur, Universit´ede Bourgogne Rapporteur Jean-Marie Chesneaux Professeur, Universit´eParis 6 Rapporteur Philippe Langlois Professeur, Universit´ede Perpignan Examinateur Christiane Frougny Professeur, Universit´eParis 7 Examinatrice Jean-Michel Muller Directeur de recherches, ENS de Lyon Directeur de th`ese Nicolas Louvet Maˆıtrede conf´erences,Universit´eLyon 1 Co-encadrant ii Contents 1 Floating-point arithmetic 7 1.1 Floating-pointnumbers............................. 7 1.1.1 Scientific notation . 7 1.1.2 Limited significand . 8 1.1.3 Limited exponent range . 8 1.2 The IEEE-754-2008 standard . 10 1.2.1 Floating-pointformats . 10 1.2.2 Special values . 11 1.2.3 Implementation of floating-point formats . 11 1.3 Roundings . 13 1.3.1 Definition . 13 1.3.2 Faithful rounding . 14 1.3.3 Breakpoints . 14 1.4 Floating-pointoperations. 15 1.4.1 Basic operations . 15 1.4.2 Function evaluation . 16 1.5 Issues related to correct rounding . 16 1.5.1 Correctly rounded function evaluation . 16 1.5.2 Double-rounding . 18 2 RN-coding 21 2.1 Definition . 22 2.1.1 Characterization of RN-codings . 23 2.1.2 Conversion algorithms . 24 2.1.3 Binary encoding . 25 2.1.4 Interval interpretation . 27 2.2 Computing with fixed-point RN-coding . 27 2.2.1 Addition of RN-Represented Values . 27 2.2.2 Multiplying RN-Represented Values . 29 2.2.3 Dividing RN-Represented Values . 32 2.3 Computing with floating-point RN-coding . 33 2.3.1 Multiplication and Division . 34 2.3.2 Addition................................. 34 2.3.3 Discussion of the Floating Point RN-representation . 35 2.4 Conclusion . 36 iii iv CONTENTS 3 Breakpoints for some algebraic functions 39 3.1 Square-root . 40 3.1.1 Midpoints for square root . 40 3.1.2 Exact points for square root . 41 3.2 Reciprocal square root . 43 3.2.1 Midpoints for reciprocal square root . 43 3.2.2 Exact points for reciprocal square root . 46 3.3 Positive integer powers . 53 3.4 The function (x, y) x/ y ......................... 53 → 2 3.5 Division . 55 3.5.1 Midpoints for division . 55 3.5.2 Exact points for division . 56 3.6 Reciprocal . 56 3.6.1 Midpoints for reciprocal . 56 3.6.2 Exact points for reciprocal . 57 3.7 Reciprocal 2D Euclidean norm . 64 3.7.1 Decomposing 2r 5s into sums of two squares . 64 · 3.7.2 Midpoints for reciprocal 2D norm . 66 3.7.3 Exact points for reciprocal 2D norm . 70 3.8 Normalization of 2D-vectors . 72 3.8.1 Midpoints for 2D normalization . 72 3.8.2 Exact points for 2D normalization . 73 3.9 2D Euclidean norm . 74 3.10 Inputs and/or outputs in the subnormal range . 74 3.10.1 Square root . 76 3.10.2 Reciprocal square root . 76 3.10.3 Division, x/ y ............................ 77 2 3.10.4 Reciprocal . 77 3.10.5 Reciprocal 2D Euclidean norm . 78 3.10.6 Normalization of 2D-vectors . 79 3.11 Conclusion . 79 4 Newton-Raphson division using an FMA 81 4.1 SRT division . 81 4.2 Newton-Raphson division . 82 4.2.1 Mathematical iteration . 83 4.2.2 Floating-pointalgorithms . 85 4.3 Faithful rounding . 86 4.3.1 Ensuring a faithful rounding . 86 4.3.2 Exact residual theorem . 87 4.4 Round-to-nearest . 87 4.4.1 Exclusion intervals . 87 4.4.2 Extending the exclusion intervals . 88 4.4.3 The midpoint case . 90 4.4.4 Correctly handling midpoint cases . 91 4.5 Error bounds . 93 4.5.1 Reciprocal iterations . 93 CONTENTS v 4.5.2 Division iterations . 95 4.6 Experiments . 95 4.7 Conclusion . 96 vi CONTENTS List of Figures 1.1 Positive floating-point numbers for β =2andp =3.. 9 1.2 The RN2(x)functionforradixβ =2andprecisionp =3.. 15 1.3 Example of an interval around fˆ(x)containingf(x)butnobreakpoint. Hence, RN(f(x)) = RN(fˆ(x)). 18 1.4 Example of an interval around fˆ(x)containingf(x)andabreakpoint.. 19 2.1 Binary Canonical RN-representations as Intervals . 27 2.2 Near Path, effective subtraction when e e 1............. 35 | a b 2.3 Far Path, add or subtract when e e −2.................| ≤ 35 | a − b| ≥ 3.1 Number of exact points for the square-root function. 44 3.2 The exactpoints of the reciprocal square-root function for the decimal32 format....................................... 48 3.3 The exactpoints of the reciprocal square-root function for the decimal64 format....................................... 48 3.4 The exactpoints of the reciprocal square-root function for the decimal128 format....................................... 48 3.5 The exactpoints of the reciprocal function for the decimal32 format. 59 3.6 The exactpoints of the reciprocal function for the decimal64 format. 59 3.7 The exactpoints of the reciprocal function for the decimal128 format. 59 3.8 Number of inputs leading to exact points for the reciprocal 2D norm in decimal 72 4.1 Example of an ordinary paper-and-pencil division . 82 4.2 Newton-Raphson’s iteration on function f(y)= 1 b used to compute a . 83 y − a b 4.3 Tightness of the condition on xˆ z ..................... 86 4.4 Use of exclusion intervals for proving| − | the correct rounding . 88 4.5 Proving the correct rounding using extended exclusion intervals . 89 a 4.6 The different cases for Algorithm 6, wheny ˜ is a faithful rounding of b ... 94 4.7 Absolute error before rounding for each algorithm considered. (M/G: Mark- stein/Goldschmidt, R/D: reciprocal/division) . 98 vii viii LIST OF FIGURES List of Tables 1.1 Parameters of the binary interchange formats in the standard IEEE-754-2008 11 1.2 Parameters of the decimal interchange formats in the standard IEEE-754-2008 11 1.3 Recommended correctly rounded functions . 17 2.1 Interpretations of additions as intervals . 28 2.2 Interpretations as intervals of multiplications of positive operands . 31 3.1 Summary of the results given in this chapter. 40 3.2 Number of exact point for the square-root function for various binary formats 43 3.3 Number of exact point for the square-root function for various decimal formats 43 3.4 Integral significands Y of y F10,p such that 1/√y M10,p, for the decimal ∈ formats of the IEEE 754-2008 standard [27]. .∈ . 45 3.5 Integral significands Y of y F10,7, such that 1/√y F10,7.......... 49 ∈ ∈ 3.6 Integral significands Y of y F10,16, such that 1/√y F10,16......... 50 ∈ ∈ 3.7 Integral significands Y of y F10,34, such that 1/√y F10,34 and ey even. 51 ∈ ∈ 3.8 Integral significands Y of y F10,34, such that 1/√y F10,34 and ey odd. 52 ∈ ∈ 3.9 Integral significands Y of y F10,p such that 1/y M10,p, for the decimal formats of the IEEE 754-2008∈ standard [27]. .∈ . 57 3.10 Integral significands Y of y F10,7 such that 1/y F10,7........... 60 ∈ ∈ 3.11 Integral significands Y of y F10,16 such that 1/y F10,16.......... 61 ∈ ∈ 3.12 Integral significands Y of y F10,34 such that 1/y F10,34.......... 62 ∈ ∈ 3.13 Integral significands Y of y F10,34 such that 1/y F10,34.......... 63 ∈ ∈ 2 2 3.14 Floating-point numbers x, y F10,7 with X Y such that z =1/ x + y 8 ∈ 7 ≥ is a midpoint, with 10− z<10− ...................... 68 ≤ 2 2 3.15 Floating-point numbers x, y F10,16 with X Y such that z =1/ x + y is a midpoint. .∈ . .≥ . 68 2 2 3.16 Floating-point numbers x, y F10,34 with X Y such that z =1/ x + y is a midpoint. .∈ . .≥ . 69 3.17 Number of midpoints in a decade for reciprocal 2D norm with a fixed exponent 70 3.18 Number of inputs giving an exactpoint for the reciprocal 2D norm for a fixed exponent..................................... 71 4.1 Number of b to check separately according to the extended radius of the p po exclusion interval µ β− i− n/2....................... 89 ≥ 4.2 Decimal floating-point numbers whose reciprocal is a midpoint in the same precision....................................

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    119 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us