## A proven correctly rounded logarithm in double-precision (2004)

### Cached

### Download Links

Venue: | In Real Numbers and Computers, Schloss Dagstuhl |

Citations: | 23 - 10 self |

### BibTeX

@INPROCEEDINGS{Dinechin04aproven,

author = {Florent De Dinechin and Christoph Lauter and Jean-michel Muller},

title = {A proven correctly rounded logarithm in double-precision},

booktitle = {In Real Numbers and Computers, Schloss Dagstuhl},

year = {2004},

pages = {85--102}

}

### OpenURL

### Abstract

Abstract. This article is a case study in the implementation of a portable, proven and efficient correctly rounded elementary function in double-precision. We describe the methodology used to achieve these goals in the crlibm library. There are two novel aspects to this approach. The first is the proof framework, and in general the techniques used to balance performance and provability. The second is the introduction of processor-specific optimization to get performance equivalent to the best current mathematical libraries, while trying to minimize the proof work. The implementation of the natural logarithm is detailed to illustrate these questions. Mathematics Subject Classification. 26-04, 65D15, 65Y99. 1.

### Citations

982 |
Interval analysis
- Moore
- 1966
(Show Context)
Citation Context ...mproved portability of such code and allowed construction of proofs of numerical behavior [18]. Directed rounding modes (towards +∞, −∞ and 0) are also the key to enable efficient interval arithmetic =-=[21, 28]-=-. However, the IEEE-754 standard specifies nothing about elementary functions, which limits these advances to code excluding such functions. Currently, several options exist: on one hand, one can use ... |

508 |
Interactive Theorem Proving and Program Development, Coq’Art:the Calculus of Inductive Constructions
- Bertot, Castéran
- 2004
(Show Context)
Citation Context ...s on a library of theorems which take into account subnormal numbers, exceptional cases, etc, which ensures that theses exceptional cases are considered. This tool outputs a proof in the Coq language =-=[3]-=-, and this proof can be machine-checked provided all the support theorems have been proven in Coq. Obviously, our divide-and-conquer approach matches this framework nicely, although we currently don’t... |

375 | What Every Computer Scientist Should Know about Floating Point Arithmetic
- Goldberg
- 1991
(Show Context)
Citation Context ...ad use have increased the numerical quality of, and confidence in floating-point code. In particular, it has improved portability of such code and allowed construction of proofs of numerical behavior =-=[18]-=-. Directed rounding modes (towards +∞, −∞ and 0) are also the key to enable efficient interval arithmetic [21, 28]. However, the IEEE-754 standard specifies nothing about elementary functions, which l... |

198 |
Elementary Functions, Algorithms and Implementation
- Muller
- 2006
(Show Context)
Citation Context ...which are efficient but without any warranty on the accuracy of the results. These implementations use combinations of large tables [16, 17, 31] and polynomial approximations (see the books by Muller =-=[30]-=- or Markstein [27]). Most modern libraries are accurate-faithful: trying to round to nearest, they return a number that is one of the two FP numbers surrounding the exact mathematical result, and inde... |

181 | for floating–point arithmetic - standard - 2006 |

79 |
IA-64 and Elementary Functions: Speed and Precision
- Markstein
- 2000
(Show Context)
Citation Context ...t but without any warranty on the accuracy of the results. These implementations use combinations of large tables [16, 17, 31] and polynomial approximations (see the books by Muller [30] or Markstein =-=[27]-=-). Most modern libraries are accurate-faithful: trying to round to nearest, they return a number that is one of the two FP numbers surrounding the exact mathematical result, and indeed return the corr... |

60 |
C-XSC A C++ Class Library for Extended Scientific Computing
- Klatte, Kulisch, et al.
- 1993
(Show Context)
Citation Context ...mproved portability of such code and allowed construction of proofs of numerical behavior [18]. Directed rounding modes (towards +∞, −∞ and 0) are also the key to enable efficient interval arithmetic =-=[21, 28]-=-. However, the IEEE-754 standard specifies nothing about elementary functions, which limits these advances to code excluding such functions. Currently, several options exist: on one hand, one can use ... |

51 |
A floating point technique for extending the available precision
- Dekker
- 1971
(Show Context)
Citation Context ...higher precision (such as y1, theresultof the first step) as the sum of two floating-point numbers, also called a double-double number. There are well-known algorithms for computing on double-doubles =-=[15]-=-. In both versions, we also make heavy use of classical, well proven results like Sterbenz’ lemma [18] which gives conditions for a floating-point subtraction to entail no rounding error. 2.5. Roundin... |

40 |
Fast Evaluation of Elementary Mathematical Functions with Correctly Rounded last Bit
- Ziv
- 1991
(Show Context)
Citation Context ...st, proven correctly rounded elementary functions. The method used to provide efficient correct rounding hasFAST AND CORRECTLY ROUNDED LOGARITHMS IN DOUBLE-PRECISION 87 been described by Abraham Ziv =-=[33]-=-. It is summarized in Section 1.2. The present article improves Ziv’s work in two important aspects. First, it proves the correct rounding property. Second, the performance is greatly improved, especi... |

38 | Worst Case for Correct Rounding of the Elementary Functions
- Lefevre, Muller
(Show Context)
Citation Context ... the previous approach and framework. 3.1. Overview The worst-case accuracy required to compute the natural logarithm correctly rounded in double precision is 118 bits according to Lefèvre and Muller =-=[24]-=-. The first step is accurate to 2 −61 , and the second step to 2 −119.5 , for all the implementations. For the quick phase we now use a different algorithm as the one presented in [11]. This choice is... |

37 |
Table lookup algorithms for elementary functions and their error analysis
- Tang
- 1991
(Show Context)
Citation Context ...ons exist: on one hand, one can use today’s mathematical libraries, which are efficient but without any warranty on the accuracy of the results. These implementations use combinations of large tables =-=[16, 17, 31]-=- and polynomial approximations (see the books by Muller [30] or Markstein [27]). Most modern libraries are accurate-faithful: trying to round to nearest, they return a number that is one of the two FP... |

32 | Towards Correctly Rounded Transcendentals
- Lefevre, Muller, et al.
- 1997
(Show Context)
Citation Context ...entation compares favorably to the best available accurate-faithful libms on most architectures. 2. The correctly rounded mathematical library 2.1. Worst cases for correct rounding Lefèvre and Muller =-=[23, 25]-=- computed the worst-case ε required for correctly rounding several functions in double-precision over selected intervals in the four IEEE-754 rounding modes. For example, they proved that 158 bits are... |

26 |
High-bandwidth evaluation of elementary functions
- Farmwald
- 1981
(Show Context)
Citation Context ...ons exist: on one hand, one can use today’s mathematical libraries, which are efficient but without any warranty on the accuracy of the results. These implementations use combinations of large tables =-=[16, 17, 31]-=- and polynomial approximations (see the books by Muller [30] or Markstein [27]). Most modern libraries are accurate-faithful: trying to round to nearest, they return a number that is one of the two FP... |

25 |
Computing elementary functions: a new approach for achieving high accuracy and good performance
- Gal
- 1986
(Show Context)
Citation Context ...ons exist: on one hand, one can use today’s mathematical libraries, which are efficient but without any warranty on the accuracy of the results. These implementations use combinations of large tables =-=[16, 17, 31]-=- and polynomial approximations (see the books by Muller [30] or Markstein [27]). Most modern libraries are accurate-faithful: trying to round to nearest, they return a number that is one of the two FP... |

25 |
Fast hardware-based algorithms for elementary function computations using rectangular multipliers
- Wong, Goto
- 1994
(Show Context)
Citation Context ... As the result is never subnormal, we may safely ignore the accuracy problems entailed by subnormal numbers. The common algorithm is inspired by the hardware based algorithm proposed by Wong and Goto =-=[32]-=- and discussed further in [30]. After handling of special cases, consider the argument x written as x =2E′ · m, whereE ′ is the exponent of x and m its mantissa, 1 ≤ m < 2. This decomposition of x int... |

22 |
Moyens arithmétiques pour un calcul fiable. Thèse, ´Ecole Normale Supérieure de
- Lefèvre
- 2000
(Show Context)
Citation Context ...entation compares favorably to the best available accurate-faithful libms on most architectures. 2. The correctly rounded mathematical library 2.1. Worst cases for correct rounding Lefèvre and Muller =-=[23, 25]-=- computed the worst-case ε required for correctly rounding several functions in double-precision over selected intervals in the four IEEE-754 rounding modes. For example, they proved that 158 bits are... |

21 | Assisted verification of elementary functions using Gappa
- Dinechin, Lauter, et al.
- 2006
(Show Context)
Citation Context ...urse, these scripts are part of the crlibm distribution. More recently, we have been making increasing use of Gappa, a tool which manages ranges and errors in numerical code using interval arithmetic =-=[5,10]-=-. This tool takes a code fragment, information on the inputs (typically their ranges and bounds on their approximation errors), and computes and propagates roundoff94 F. DE DINECHIN, C. LAUTER AND J.... |

18 |
Generating formally certified bounds on values and round-off errors
- Daumas, Melquiond
- 2004
(Show Context)
Citation Context ...urse, these scripts are part of the crlibm distribution. More recently, we have been making increasing use of Gappa, a tool which manages ranges and errors in numerical code using interval arithmetic =-=[5,10]-=-. This tool takes a code fragment, information on the inputs (typically their ranges and bounds on their approximation errors), and computes and propagates roundoff94 F. DE DINECHIN, C. LAUTER AND J.... |

16 | Towards the post-ultimate libm
- Dinechin, Ershov, et al.
- 2005
(Show Context)
Citation Context ...ose already used and proven for double-double. And it isFAST AND CORRECTLY ROUNDED LOGARITHMS IN DOUBLE-PRECISION 91 much more efficient than scslib: wemeasureafactor10intheworst-case execution time =-=[9]-=-. • Finally, we are developping portable second steps based on triple-double arithmetic [22]. This approach is also much more efficient than scslib, but it is also much more difficult to use and to pr... |

11 |
Fast correct rounding of elementary functions in double precision using double-extended arithmetic
- Dinechin, Defour, et al.
- 2004
(Show Context)
Citation Context ...ble-extended intermediate computations are always enough to ensure correct rounding, even when worst cases have been found requiring more than the 128 bits of precision offered by this representation =-=[8]-=-. Using double-double-extended is not as simple as using scslib, however the algorithms are those already used and proven for double-double. And it isFAST AND CORRECTLY ROUNDED LOGARITHMS IN DOUBLE-P... |

11 |
Software carry-save for fast multiple-precision algorithms
- Defour, Dinechin
- 2002
(Show Context)
Citation Context .... • We have designed an ad-hoc multiple-precision library called scslib which is lightweight, very easy to use in the context of crlibm, andmoreefficient than all other available comparable libraries =-=[7, 13]-=-. It allows quick development of the second step, and has been used for the initial implementation of all the functions. It is based on integer arithmetic. • For the DE version of the second step, it ... |

11 |
Basic building blocks for a triple-double intermediate format
- Lauter
- 2005
(Show Context)
Citation Context ...HMS IN DOUBLE-PRECISION 91 much more efficient than scslib: wemeasureafactor10intheworst-case execution time [9]. • Finally, we are developping portable second steps based on triple-double arithmetic =-=[22]-=-. This approach is also much more efficient than scslib, but it is also much more difficult to use and to prove. The logarithm presented below was the first function to be implemented using this techn... |

9 |
FI LIB, eine schnelle und portable Funktionsbibliothek für reelle Argumente und reelle Intervalle im IEEE-double-Format,” Institut für Wissenschaftliches Rechnen und Mathematische Modellbildung, Universität
- Hofschuster, Krämer
- 1998
(Show Context)
Citation Context ...oose up to two ulps of precision in each computation. Actually, current interval elementary function libraries are even less accurate than that, because they sacrifice accuracy to a very strict proof =-=[19]-=-. The goal of the crlibm (correctly rounded libm) project is therefore a library which is • correctly rounded in the four IEEE-754 rounding modes; • proven; • and sufficiently efficient in terms of pe... |

8 | Software carry-save: A case study for instruction-level parallelism
- Dinechin, Defour
- 2003
(Show Context)
Citation Context .... • We have designed an ad-hoc multiple-precision library called scslib which is lightweight, very easy to use in the context of crlibm, andmoreefficient than all other available comparable libraries =-=[7, 13]-=-. It allows quick development of the second step, and has been used for the initial implementation of all the functions. It is based on integer arithmetic. • For the DE version of the second step, it ... |

7 |
Cache-optimised methods for the evaluation of elementary functions
- Defour
- 2002
(Show Context)
Citation Context ...r IEEE-754 rounding modes; • proven; • and sufficiently efficient in terms of performance (both average and worstcase) and resources (in particular we try to limit the table sizes to 4KB per function =-=[6]-=-, although this bound may be relaxed for some functions or on some architectures) to enable the standardization of correct rounding for elementary functions. 1.4. Organisation of this article Section ... |

7 | Correctly rounded exponential function in double precision arithmetic
- Defour, Dinechin, et al.
- 2001
(Show Context)
Citation Context ...ed floating-point features available in recent mainstream processors, and as a consequence accepting a much lower average performance than the default, accurate-faithful libm, typically by a factor 2 =-=[11, 14]-=-. Among these advanced features, the most relevant to the implementation of elementary functions are: • hardware double-extended (DE) precision, which provides 64 bits of mantissa instead of the 53 bi... |

4 |
Fast and correctly rounded logarithms
- Dinechin, Muller
- 2007
(Show Context)
Citation Context ...ed floating-point features available in recent mainstream processors, and as a consequence accepting a much lower average performance than the default, accurate-faithful libm, typically by a factor 2 =-=[11, 14]-=-. Among these advanced features, the most relevant to the implementation of elementary functions are: • hardware double-extended (DE) precision, which provides 64 bits of mantissa instead of the 53 bi... |

2 | Collapsing dependent floating point operations - Defour - 2004 |

1 |
Fast correct rounding of elementary functions in double precision using double-extended arithmetic
- Lauter
- 2004
(Show Context)
Citation Context ...ble-extended intermediate computations are always enough to ensure correct rounding, even when worst cases have been found requiring more than the 128 bits of precision offered by this representation =-=[8]-=-. Using double-double-extended is not as simple as using scslib, however the algorithms are those already used and proven for double-double. And it is much more efficient than scslib: we measure a fac... |