Abstract
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.
This is a preview of subscription content, access via your institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptions

Notes
- 1.
Available at http://arblib.org. The functionality for modular forms and elliptic functions can be found in the acb_modular (http://arblib.org/acb_modular.html) and acb_elliptic (http://arblib.org/acb_elliptic.html) modules.
- 2.
Of course, for applications that do not require rigorous error bounds, all the algorithms can just as well be implemented in ordinary floating-point arithmetic.
- 3.
- 4.
The number is somewhat smaller if the series is truncated optimally using a relative rather than an absolute tolerance.
- 5.
We give the inverse form of the transformation.
- 6.
For \(\varPi \), Mathematica restricts this quasiperiodicity relation to hold only for \(-1 \le n \le 1\).
- 7.
This is an algebraic simplification, so we can take \(E_1 = 0\) even if the input argument are represented by inexact balls.
- 8.
At precision up to about 1000 digits, the elementary functions in Arb are significantly faster than the AGM due to using precomputed lookup tables and many low-level optimizations [14].
References
D.H. Bailey, J.M. Borwein, High-precision numerical integration: progress and challenges. J. Symb. Comput. 46(7), 741–754 (2011)
D.H. Bailey, J.M. Borwein, High-precision arithmetic in mathematical physics. Mathematics 3(2), 337–367 (2015)
R.P. Brent, P. Zimmermann, Modern Computer Arithmetic (Cambridge University Press, Cambridge, 2010)
B.C. Carlson, Numerical computation of real or complex elliptic integrals. Numer. Algorithms 10(1), 13–26 (1995)
H. Cohen, A Course in Computational Algebraic Number Theory (Springer Science & Business Media, Berlin, 2013)
D.A. Cox, The arithmetic-geometric mean of Gauss. Pi: A Source Book (Springer, Berlin, 2000), pp. 481–536
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)
R. Dupont, Moyenne arithmético-géométrique, suites de Borchardt et applications. Ph.D. thesis, École polytechnique, Palaiseau, 2006
R. Dupont, Fast evaluation of modular functions using Newton iterations and the AGM. Math. Comput. 80(275), 1823–1847 (2011)
A. Enge, The complexity of class polynomial computation via floating point approximations. Math. Comput. 78(266), 1089–1107 (2009)
A. Enge, W. Hart, F. Johansson, Short addition sequences for theta functions. J. Integer Seq. 21(2), 3 (2018)
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–1
D. Izzo, F. Biscani. On the astrodynamics applications of Weierstrass elliptic and related functions (2016), https://arxiv.org/abs/1601.04963
F. Johansson, Efficient implementation of elementary functions in the medium-precision range, in 22nd IEEE Symposium on Computer Arithmetic, ARITH22 (2015), pp. 83–89
F. Johansson, Computing hypergeometric functions rigorously (2016), http://arxiv.org/abs/1606.06977
F. Johansson, Arb: efficient arbitrary-precision midpoint-radius interval arithmetic. IEEE Trans. Comput. 66, 1281–1292 (2017)
F. Johansson, Numerical integration in arbitrary-precision ball arithmetic (2018), https://arxiv.org/abs/1802.07942
H. Labrande, Computing Jacobi’s theta in quasi-linear time. Math. Comput. (2017)
P. Molin, Numerical integration and L-functions computations. Thesis, Université Sciences et Technologies - Bordeaux I, October 2010
P. Molin, C. Neurohr, Computing period matrices and the Abel–Jacobi map of superelliptic curves (2017), arXiv:1707.07249
J.M. Muller, Elementary Functions (Springer, Berlin, 2006)
D. Nogneng, E. Schost, On the evaluation of some sparse polynomials. Math. Comput. 87, 893–904 (2018)
F.W.J. Olver, D.W. Lozier, R.F. Boisvert, C.W. Clark, NIST Handbook of Mathematical Functions (Cambridge University Press, New York, 2010)
M.S. Paterson, L.J. Stockmeyer, On the number of nonscalar multiplications necessary to evaluate polynomials. SIAM J. Comput. 2(1) (1973)
H. Rademacher, Topics in Analytic Number Theory (Springer, Berlin, 1973)
D.M. Smith, Efficient multiple-precision evaluation of elementary functions. Math. Comput. 52, 131–134 (1989)
H. Takahasi, M. Mori, Double exponential formulas for numerical integration. Publ. Res. Inst. Math. Sci. 9(3), 721–741 (1974)
The PARI Group, Univ. Bordeaux. PARI/GP version 2.9.4, 2017
The Sage Developers, SageMath, The Sage Mathematics Software System (Version 8.2.0) (2018), http://www.sagemath.org
L.N. Trefethen, J.A.C. Weideman, The exponentially convergent trapezoidal rule. SIAM Rev. 56(3), 385–458 (2014)
Wolfram Research, The Wolfram Functions Site - Elliptic Integrals (2016), http://functions.wolfram.com/EllipticIntegrals/
Acknowledgements
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.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this chapter
Cite this chapter
Johansson, F. (2019). Numerical Evaluation of Elliptic Functions, Elliptic Integrals and Modular Forms. In: Blümlein, J., Schneider, C., Paule, P. (eds) Elliptic Integrals, Elliptic Functions and Modular Forms in Quantum Field Theory. Texts & Monographs in Symbolic Computation. Springer, Cham. https://doi.org/10.1007/978-3-030-04480-0_12
Download citation
DOI: https://doi.org/10.1007/978-3-030-04480-0_12
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-04479-4
Online ISBN: 978-3-030-04480-0
eBook Packages: Computer ScienceComputer Science (R0)
