Computing floating-point logarithms with fixed-point operations
Authors:
- Julien Le MaireJMJulien Le Maire
- Nicolas BrunieNBNicolas Brunie
- Florent De DinechinFDFlorent De Dinechin
- Jean-Michel MullerJMJean-Michel Muller
- 8 September 2016
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- No. 10636889,p. 156-163
Abstract
Elementary functions from the mathematical library input and output floating-point numbers. However it is possible to implement them purely using integer/fixed-point arithmetic. This option was not attractive between 1985 and 2005, because mainstream processor hardware supported 64-bit floating-point, but only 32-bit integers. This has changed in recent years, in particular with the generalization of native 64-bit integer support. The purpose of this article is therefore to reevaluate the relevance of computing floating-point functions in fixed-point. For this, several variants of the double-precision logarithm function are implemented and evaluated. Formulating the problem as a fixed-point one is easy after the range has been (classically) reduced. Then, 64-bit integers provide slightly more accuracy than 53-bit mantissa, which helps speed up the evaluation. Finally, multi-word arithmetic, critical for accurate implementations, is much faster in fixed-point, and natively supported by recent compilers. Thanks to all this, a purely integer implementation of the correctly rounded double-precision logarithm outperforms the previous state of the art, with the worst-case execution time reduced by a factor 5. This work also introduces variants of the logarithm that input a floating-point number and output the result in fixed-point. These are shown to be both more accurate and more efficient than the traditional floating-point functions for some applications.Keywords
This publication has 14 references indexed in Scilit:
- Simultaneous Floating-Point Sine and Cosine for VLIW Integer Processors2012
- Certifying the Floating-Point Implementation of an Elementary Function Using GappaIEEE Transactions on Computers, 2010
- Sollya: An Environment for the Development of Numerical Codes2010
- Return of the hardware floating-point elementary function18th IEEE Symposium on Computer Arithmetic (ARITH '07), 2007
- Fast and correctly rounded logarithms in double-precisionRAIRO - Theoretical Informatics and Applications, 2007
- An overview of floating-point support and math library on the Intel/spl reg/ XScale/spl trade/ architecture2004
- Fast hardware-based algorithms for elementary function computations using rectangular multipliersIEEE Transactions on Computers, 1994
- Fast evaluation of elementary mathematical functions with correctly rounded last bitACM Transactions on Mathematical Software, 1991
- Table-driven implementation of the logarithm function in IEEE floating-point arithmeticACM Transactions on Mathematical Software, 1990
- Radix-16 Evaluation of Certain Elementary FunctionsIEEE Transactions on Computers, 1973