Evaluating Floating-Point Elementary Functions

  • Jean-Michel Muller
  • Nicolas Brunie
  • Florent de Dinechin
  • Claude-Pierre Jeannerod
  • Mioara Joldes
  • Vincent Lefèvre
  • Guillaume Melquiond
  • Nathalie Revol
  • Serge Torres


The elementary functions (the right term is “elementary transcendental functions”) are the most common mathematical functions: sine, cosine, tangent, and their inverses, exponentials and logarithms of radices e, 2, or 10, etc. They appear everywhere in scientific computing. Therefore, being able to evaluate them quickly and accurately is important for many applications. Many very different methods have been used for evaluating them: polynomial or rational approximations, shift-and-add algorithms, table-based methods, etc.


  1. [47]
    S. Boldo, M. Daumas, and R.-C. Li. Formally verified argument reduction with a fused multiply-add. IEEE Transactions on Computers, 58(8):1139–1145, 2009.MathSciNetCrossRefGoogle Scholar
  2. [59]
    P. Borwein and T. Erdélyi. Polynomials and Polynomial Inequalities. Graduate Texts in Mathematics, 161. Springer-Verlag, New York, 1995.CrossRefGoogle Scholar
  3. [68]
    N. Brisebarre and S. Chevillard. Efficient polynomial L approximations. In 18th IEEE Symposium on Computer Arithmetic (ARITH-18), pages 169–176, Montpellier, France, 2007.Google Scholar
  4. [70]
    N. Brisebarre and G. Hanrot. Floating-point L 2-approximations to functions. In 18th IEEE Symposium on Computer Arithmetic (ARITH-18), pages 177–186, Montpellier, France, 2007.Google Scholar
  5. [71]
    N. Brisebarre, G. Hanrot, and O. Robert. Exponential sums and correctly-rounded functions. IEEE Transactions on Computers, 66(12):2044–2057, 2017.MathSciNetCrossRefGoogle Scholar
  6. [96]
    S. Chevillard, J. Harrison, M. Joldeş, and C. Lauter. Efficient and accurate computation of upper bounds of approximation errors. Theoretical Computer Science, 412(16):1523–1543, 2011.MathSciNetCrossRefGoogle Scholar
  7. [97]
    S. Chevillard, M. Joldeş, and C. Q. Lauter. Sollya: An environment for the development of numerical codes. In 3rd International Congress on Mathematical Software (ICMS), volume 6327 of Lecture Notes in Computer Science, pages 28–31, September 2010.CrossRefGoogle Scholar
  8. [98]
    S. Chevillard and C. Q. Lauter. A certified infinite norm for the implementation of elementary functions. In 7th International Conference on Quality Software (QSIC), pages 153–160, Portland, OR, USA, 2007.Google Scholar
  9. [103]
    D. Cochran. Algorithms and accuracy in the HP 35. Hewlett Packard Journal, 23:10–11, 1972.Google Scholar
  10. [105]
    W. J. Cody. Implementation and testing of function software. In Problems and Methodologies in Mathematical Software Production, volume 142 of Lecture Notes in Computer Science, 1982.Google Scholar
  11. [107]
    W. J. Cody and W. Waite. Software Manual for the Elementary Functions. Prentice-Hall, Englewood Cliffs, NJ, 1980.zbMATHGoogle Scholar
  12. [113]
    D. Coppersmith. Finding a small root of a univariate modular equation. In Advances in Cryptology – EUROCRYPT, volume 1070 of Lecture Notes in Computer Science, pages 155–165, Saragossa, Spain, May 1996.CrossRefGoogle Scholar
  13. [114]
    D. Coppersmith. Finding small solutions to small degree polynomials. In International Conference on Cryptography and Lattices (CaLC), volume 2146 of Lecture Notes in Computer Science, pages 20–31, Providence, RI, USA, March 2001.Google Scholar
  14. [118]
    M. Cornea, J. Harrison, and P. T. P. Tang. Scientific Computing on Itanium ®; -based Systems. Intel Press, Hillsboro, OR, 2002.Google Scholar
  15. [129]
    C. Daramy-Loirat, D. Defour, F. de Dinechin, M. Gallet, N. Gast, C. Q. Lauter, and J.-M. Muller. CR-LIBM, a library of correctly-rounded elementary functions in double-precision. Technical report, LIP Laboratory, Arenaire team, December 2006. Available at
  16. [143]
    F. de Dinechin and M. Istoan. Hardware implementations of fixed-point Atan2. In 22nd IEEE Symposium of Computer Arithmetic (ARITH-22), pages 34–41, June 2015.Google Scholar
  17. [144]
    F. de Dinechin, M. Istoan, and G. Sergent. Fixed-point trigonometric functions on FPGAs. SIGARCH Computer Architecture News, 41(5):83–88, 2013.CrossRefGoogle Scholar
  18. [147]
    F. de Dinechin, C. Q. Lauter, and G. Melquiond. Certifying the floating-point implementation of an elementary function using Gappa. IEEE Transactions on Computers, 60(2):242–253, 2011.MathSciNetCrossRefGoogle Scholar
  19. [149]
    F. de Dinechin, C. Q. Lauter, J.-M. Muller, and S. Torres. On Ziv’s rounding test. ACM Transactions on Mathematical Software, 39(4), 2013.MathSciNetCrossRefGoogle Scholar
  20. [151]
    F. de Dinechin, C. Loirat, and J.-M. Muller. A proven correctly rounded logarithm in double-precision. In 6th Conference on Real Numbers and Computers (RNC-6), 2004.Google Scholar
  21. [174]
    J. Detrey, F. de Dinechin, and X. Pujol. Return of the hardware floating-point elementary function. In 18th Symposium on Computer Arithmetic (ARITH-18), pages 161–168, June 2007.Google Scholar
  22. [177]
    W. S. Dorn. Generalizations of Horner’s rule for polynomial evaluation. IBM Journal of Research and Development, 6(2):239–245, 1962.MathSciNetCrossRefGoogle Scholar
  23. [185]
    M. Ercegovac. Radix-16 evaluation of certain elementary functions. IEEE Transactions on Computers, C-22(6):561–566, 1973.CrossRefGoogle Scholar
  24. [203]
    P. Fortin, M. Gouicem, and S. Graillat. Towards solving the Table Maker’s Dilemma on GPU. In 20th Euromicro International Conference on Parallel, Distributed and Network-Based Processing (PDP), pages 407–415, February 2012.Google Scholar
  25. [204]
    L. Fousse, G. Hanrot, V. Lefèvre, P. Pélissier, and P. Zimmermann. MPFR: A multiple-precision binary floating-point library with correct rounding. ACM Transactions on Mathematical Software, 33(2), 2007. 15 pages. Available at Scholar
  26. [206]
    W. Fraser. A survey of methods of computing minimax and near-minimax polynomial approximations for functions of a single independent variable. Journal of the ACM, 12(3):295–314, 1965.MathSciNetCrossRefGoogle Scholar
  27. [225]
    B. Greer, J. Harrison, G. Henry, W. Li, and P. Tang. Scientific computing on the ItaniumTM processor. In ACM/IEEE Conference on Supercomputing (Supercomputing ‘01), pages 41–41, 2001.Google Scholar
  28. [245]
    J. Harrison, T. Kubaska, S. Story, and P. T. P. Tang. The computation of transcendental functions on the IA-64 architecture. Intel Technology Journal, Q4, 1999. Available at
  29. [246]
    J. F. Hart, E. W. Cheney, C. L. Lawson, H. J. Maehly, C. K. Mesztenyi, J. R. Rice, H. G. Thacher, and C. Witzgall. Computer Approximations. John Wiley & Sons, New York, 1968.zbMATHGoogle Scholar
  30. [284]
    C. Iordache and P. T. P. Tang. An overview of floating-point support and math library on the Intel XScale architecture. In 16th IEEE Symposium on Computer Arithmetic (ARITH-16), pages 122–128, June 2003.Google Scholar
  31. [297]
    C.-P. Jeannerod, N. Louvet, J.-M. Muller, and A. Panhaleux. Midpoints and exact points of some algebraic functions in floating-point arithmetic. IEEE Transactions on Computers, 60(2), 2011.MathSciNetCrossRefGoogle Scholar
  32. [316]
    W. Kahan. Minimizing q*m-n. Text accessible electronically at At the beginning of the file “nearpi.c”, 1983.
  33. [321]
    W. Kahan. A logarithm too clever by half. Available at, 2004.
  34. [336]
    Khronos OpenCL Working Group. The OpenCL SPIR-V Environment Specification, version 2.2, May 2017. Available at
  35. [338]
    P. Kirchberger. Ueber Tchebychefsche Annaeherungsmethoden. Ph.D. thesis, Gottingen, 1902.Google Scholar
  36. [371]
    C. Q. Lauter. Arrondi Correct de Fonctions Mathématiques. Ph.D. thesis, École Normale Supérieure de Lyon, Lyon, France, October 2008. In French, available at
  37. [372]
    J. Le Maire, N. Brunie, F. de Dinechin, and J.-M. Muller. Computing floating-point logarithms with fixed-point operations. In 23rd IEEE Symposium of Computer Arithmetic (ARITH-23), July 2016.Google Scholar
  38. [376]
    V. Lefèvre. Moyens Arithmétiques Pour un Calcul Fiable. Ph.D. thesis, École Normale Supérieure de Lyon, Lyon, France, 2000.Google Scholar
  39. [378]
    V. Lefèvre. New results on the distance between a segment and \(\mathbb{Z}^{2}\). Application to the exact rounding. In 17th IEEE Symposium on Computer Arithmetic (ARITH-17), pages 68–75, June 2005.Google Scholar
  40. [380]
    V. Lefèvre and J.-M. Muller. Worst cases for correct rounding of the elementary functions in double precision. In 15th IEEE Symposium on Computer Arithmetic (ARITH-15), June 2001.Google Scholar
  41. [401]
    N. Macon and A. Spitzbart. Inverses of Vandermonde matrices. American Mathematical Monthly, 65(2):95–100, 1958.MathSciNetCrossRefGoogle Scholar
  42. [406]
    P. Markstein. IA-64 and Elementary Functions: Speed and Precision. Hewlett-Packard Professional Books. Prentice-Hall, Englewood Cliffs, NJ, 2000.Google Scholar
  43. [414]
    P. Meher, J. Valls, T.-B. Juang, K. Sridharan, and K. Maharatna. 50 years of CORDIC: Algorithms, architectures, and applications. IEEE Transactions on Circuits and Systems I: Regular Papers, 56(9):1893–1907, 2009.MathSciNetCrossRefGoogle Scholar
  44. [415]
    G. Melquiond. De l’arithmétique d’intervalles à la certification de programmes. Ph.D. thesis, École Normale Supérieure de Lyon, November 2006. In French, available at
  45. [433]
    C. Mouilleron and G. Revy. Automatic generation of fast and certified code for polynomial evaluation. In 20th IEEE Symposium on Computer Arithmetic, pages 233–242, 2011.Google Scholar
  46. [442]
    J.-M. Muller. Elementary Functions, Algorithms and Implementation. Birkhäuser Boston, MA, 3rd edition, 2016.CrossRefGoogle Scholar
  47. [451]
    R. Nave. Implementation of transcendental functions on a numerics processor. Microprocessing and Microprogramming, 11:221–225, 1983.CrossRefGoogle Scholar
  48. [459]
    K. C. Ng. Argument reduction for huge arguments: Good to the last bit. Technical report, SunPro, 1992.Google Scholar
  49. [487]
    M. Payne and R. Hanek. Radian reduction for trigonometric functions. SIGNUM Newsletter, 18:19–24, 1983.CrossRefGoogle Scholar
  50. [505]
    E. Remez. Sur un procédé convergent d’approximations successives pour déterminer les polynômes d’approximation. C.R. Académie des Sciences, Paris, 198:2063–2065, 1934. In French.zbMATHGoogle Scholar
  51. [510]
    T. J. Rivlin. Chebyshev polynomials. From approximation theory to algebra. John Wiley & Sons, New York, 2nd edition, 1990.Google Scholar
  52. [539]
    J.-L. Sanchez, A. Jimeno, H. Mora, J. Mora, and F. Pujol. A CORDIC-based architecture for high performance decimal calculation. In IEEE International Symposium on Industrial Electronics, pages 1951–1956, June 2007.Google Scholar
  53. [542]
    H. Schmid and A. Bogacki. Use decimal CORDIC for generation of many transcendental functions. EDN, pages 64–73, 1973.Google Scholar
  54. [560]
    R. A. Smith. A continued-fraction analysis of trigonometric argument reduction. IEEE Transactions on Computers, 44(11):1348–1351, 1995.CrossRefGoogle Scholar
  55. [568]
    D. Stehlé. Algorithmique de la Réduction de Réseaux et Application à la Recherche de Pires Cas pour l’Arrondi de Fonctions Mathématiques. Ph.D. thesis, Université Henri Poincaré – Nancy 1, France, December 2005.Google Scholar
  56. [569]
    D. Stehlé. On the randomness of bits generated by sufficiently smooth functions. In 7th Algorithmic Number Theory Symposium (ANTS), volume 4078 of Lecture Notes in Computer Science, pages 257–274, 2006.Google Scholar
  57. [570]
    D. Stehlé, V. Lefèvre, and P. Zimmermann. Worst cases and lattice reduction. In 16th IEEE Symposium on Computer Arithmetic (ARITH-16), pages 142–147, June 2003.Google Scholar
  58. [571]
    D. Stehlé, V. Lefèvre, and P. Zimmermann. Searching worst cases of a one-variable function. IEEE Transactions on Computers, 54(3):340–346, 2005.CrossRefGoogle Scholar
  59. [588]
    P. T. P. Tang. Table-driven implementation of the exponential function in IEEE floating-point arithmetic. ACM Transactions on Mathematical Software, 15(2):144–157, 1989.CrossRefGoogle Scholar
  60. [589]
    P. T. P. Tang. Table-driven implementation of the logarithm function in IEEE floating-point arithmetic. ACM Transactions on Mathematical Software, 16(4):378–400, 1990.CrossRefGoogle Scholar
  61. [590]
    P. T. P. Tang. Table lookup algorithms for elementary functions and their error analysis. In 10th IEEE Symposium on Computer Arithmetic (ARITH-10), pages 232–236, June 1991.Google Scholar
  62. [591]
    P. T. P. Tang. Table-driven implementation of the expm1 function in IEEE floating-point arithmetic. ACM Transactions on Mathematical Software, 18(2):211–222, 1992.MathSciNetCrossRefGoogle Scholar
  63. [604]
    S. Torres. Tools for the Design of Reliable and Efficient Function Evaluation Libraries. Ph.D. thesis, Université de Lyon, 2016. Available at
  64. [606]
    L. Trefethen. Approximation Theory and Approximation Practice. SIAM, 2013.Google Scholar
  65. [615]
    L. Veidinger. On the numerical determination of the best approximations in the Chebyshev sense. Numerische Mathematik, 2:99–105, 1960.MathSciNetCrossRefGoogle Scholar
  66. [619]
    J. E. Volder. The CORDIC trigonometric computing technique. IRE Transactions on Electronic Computers, EC-8(3):330–334, 1959.CrossRefGoogle Scholar
  67. [620]
    J. E. Volder. The birth of CORDIC. Journal of VLSI Signal Processing Systems, 25(2):101–105, 2000.CrossRefGoogle Scholar
  68. [625]
    J. S. Walther. A unified algorithm for elementary functions. In Joint Computer Conference Proceedings, 1971. Reprinted in [583].Google Scholar
  69. [626]
    J. S. Walther. The story of unified CORDIC. Journal of VLSI Signal Processing Systems, 25(2):107–112, 2000.MathSciNetCrossRefGoogle Scholar
  70. [637]
    W. F. Wong and E. Goto. Fast hardware-based algorithms for elementary function computations using rectangular multipliers. IEEE Transactions on Computers, 43(3):278–294, 1994.CrossRefGoogle Scholar
  71. [646]
    A. Ziv. Fast evaluation of elementary mathematical functions with correctly rounded last bit. ACM Transactions on Mathematical Software, 17(3):410–423, 1991.CrossRefGoogle Scholar

Copyright information

© Springer International Publishing AG, part of Springer Nature 2018

Authors and Affiliations

  • Jean-Michel Muller
    • 1
  • Nicolas Brunie
    • 2
  • Florent de Dinechin
    • 3
  • Claude-Pierre Jeannerod
    • 4
  • Mioara Joldes
    • 5
  • Vincent Lefèvre
    • 4
  • Guillaume Melquiond
    • 6
  • Nathalie Revol
    • 4
  • Serge Torres
    • 7
  1. 1.CNRS - LIPLyonFrance
  2. 2.KalrayGrenobleFrance
  3. 3.INSA-Lyon - CITIVilleurbanneFrance
  4. 4.Inria - LIPLyonFrance
  5. 5.CNRS - LAASToulouseFrance
  6. 6.Inria - LRIOrsayFrance
  7. 7.ENS-Lyon - LIPLyonFrance

Personalised recommendations