Numerical Evaluation of Elliptic Functions, Elliptic Integrals and Modular Forms

  • Fredrik JohanssonEmail author
Part of the Texts & Monographs in Symbolic Computation book series (TEXTSMONOGR)


We describe algorithms to compute elliptic functions and their relatives (Jacobi theta functions, modular forms, elliptic integrals, and the arithmetic-geometric mean) numerically to arbitrary precision with rigorous error bounds for arbitrary complex variables. Implementations in ball arithmetic are available in the open source Arb library. We discuss the algorithms from a concrete implementation point of view, with focus on performance at tens to thousands of digits of precision.



The author thanks the organizers of the KMPB Conference on Elliptic Integrals, Elliptic Functions and Modular Forms in Quantum Field Theory for the invitation to present this work at DESY in October 2017 and for the opportunity to publish this extended review in the post-conference proceedings.


  1. 1.
    D.H. Bailey, J.M. Borwein, High-precision numerical integration: progress and challenges. J. Symb. Comput. 46(7), 741–754 (2011)MathSciNetCrossRefGoogle Scholar
  2. 2.
    D.H. Bailey, J.M. Borwein, High-precision arithmetic in mathematical physics. Mathematics 3(2), 337–367 (2015)CrossRefGoogle Scholar
  3. 3.
    R.P. Brent, P. Zimmermann, Modern Computer Arithmetic (Cambridge University Press, Cambridge, 2010)CrossRefGoogle Scholar
  4. 4.
    B.C. Carlson, Numerical computation of real or complex elliptic integrals. Numer. Algorithms 10(1), 13–26 (1995)MathSciNetCrossRefGoogle Scholar
  5. 5.
    H. Cohen, A Course in Computational Algebraic Number Theory (Springer Science & Business Media, Berlin, 2013)Google Scholar
  6. 6.
    D.A. Cox, The arithmetic-geometric mean of Gauss. Pi: A Source Book (Springer, Berlin, 2000), pp. 481–536CrossRefGoogle Scholar
  7. 7.
    J.E. Cremona, T. Thongjunthug, The complex AGM, periods of elliptic curves over C and complex elliptic logarithms. J. Number Theory 133(8), 2813–2841 (2013)MathSciNetCrossRefGoogle Scholar
  8. 8.
    R. Dupont, Moyenne arithmético-géométrique, suites de Borchardt et applications. Ph.D. thesis, École polytechnique, Palaiseau, 2006Google Scholar
  9. 9.
    R. Dupont, Fast evaluation of modular functions using Newton iterations and the AGM. Math. Comput. 80(275), 1823–1847 (2011)MathSciNetCrossRefGoogle Scholar
  10. 10.
    A. Enge, The complexity of class polynomial computation via floating point approximations. Math. Comput. 78(266), 1089–1107 (2009)MathSciNetCrossRefGoogle Scholar
  11. 11.
    A. Enge, W. Hart, F. Johansson, Short addition sequences for theta functions. J. Integer Seq. 21(2), 3 (2018)MathSciNetzbMATHGoogle Scholar
  12. 12.
    C. Fieker, W. Hart, T. Hofmann, F. Johansson. Nemo/Hecke: computer algebra and number theory packages for the Julia programming language, in Proceedings of the 42nd International Symposium on Symbolic and Algebraic Computation, ISSAC ’17, Kaiserslautern, Germany (ACM, 2017), pp. 1–1Google Scholar
  13. 13.
    D. Izzo, F. Biscani. On the astrodynamics applications of Weierstrass elliptic and related functions (2016),
  14. 14.
    F. Johansson, Efficient implementation of elementary functions in the medium-precision range, in 22nd IEEE Symposium on Computer Arithmetic, ARITH22 (2015), pp. 83–89Google Scholar
  15. 15.
    F. Johansson, Computing hypergeometric functions rigorously (2016),
  16. 16.
    F. Johansson, Arb: efficient arbitrary-precision midpoint-radius interval arithmetic. IEEE Trans. Comput. 66, 1281–1292 (2017)MathSciNetCrossRefGoogle Scholar
  17. 17.
    F. Johansson, Numerical integration in arbitrary-precision ball arithmetic (2018),
  18. 18.
    H. Labrande, Computing Jacobi’s theta in quasi-linear time. Math. Comput. (2017)Google Scholar
  19. 19.
    P. Molin, Numerical integration and L-functions computations. Thesis, Université Sciences et Technologies - Bordeaux I, October 2010Google Scholar
  20. 20.
    P. Molin, C. Neurohr, Computing period matrices and the Abel–Jacobi map of superelliptic curves (2017), arXiv:1707.07249
  21. 21.
    J.M. Muller, Elementary Functions (Springer, Berlin, 2006)zbMATHGoogle Scholar
  22. 22.
    D. Nogneng, E. Schost, On the evaluation of some sparse polynomials. Math. Comput. 87, 893–904 (2018)MathSciNetCrossRefGoogle Scholar
  23. 23.
    F.W.J. Olver, D.W. Lozier, R.F. Boisvert, C.W. Clark, NIST Handbook of Mathematical Functions (Cambridge University Press, New York, 2010)zbMATHGoogle Scholar
  24. 24.
    M.S. Paterson, L.J. Stockmeyer, On the number of nonscalar multiplications necessary to evaluate polynomials. SIAM J. Comput. 2(1) (1973)MathSciNetCrossRefGoogle Scholar
  25. 25.
    H. Rademacher, Topics in Analytic Number Theory (Springer, Berlin, 1973)CrossRefGoogle Scholar
  26. 26.
    D.M. Smith, Efficient multiple-precision evaluation of elementary functions. Math. Comput. 52, 131–134 (1989)MathSciNetCrossRefGoogle Scholar
  27. 27.
    H. Takahasi, M. Mori, Double exponential formulas for numerical integration. Publ. Res. Inst. Math. Sci. 9(3), 721–741 (1974)MathSciNetCrossRefGoogle Scholar
  28. 28.
    The PARI Group, Univ. Bordeaux. PARI/GP version 2.9.4, 2017Google Scholar
  29. 29.
    The Sage Developers, SageMath, The Sage Mathematics Software System (Version 8.2.0) (2018),
  30. 30.
    L.N. Trefethen, J.A.C. Weideman, The exponentially convergent trapezoidal rule. SIAM Rev. 56(3), 385–458 (2014)MathSciNetCrossRefGoogle Scholar
  31. 31.
    Wolfram Research, The Wolfram Functions Site - Elliptic Integrals (2016),

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  1. 1.INRIA – LFANT, CNRS – IMB – UMR 5251Université de BordeauxTalenceFrance

Personalised recommendations