Fast and Rigorous Computation of Special Functions to High Precision

The problem of efficiently evaluating special functions to high precision has been considered by numerous authors. Important tools used for this purpose include algorithms for evaluation of linearly recurrent sequences, and algorithms for power series arithmetic. In this work, we give new baby-step, giant-step algorithms for evaluation of linearly recurrent sequences involving an expensive parameter (such as a high-precision real number) and for computing compositional inverses of power series. Our algorithms do not have the best asymptotic complexity, but they are faster than previous algorithms in practice over a large input range. Using a combination of techniques, we also obtain efficient new algorithms for numerically evaluating the gamma function Γ(z) and the Hurwitz zeta function ζ(s, a), or Taylor series expansions of those functions, with rigorous error bounds. Our methods achieve softly optimal complexity when computing a large number of derivatives to proportionally high precision. Finally, we show that isolated values of the integer partition function p(n) can be computed rigorously with softly optimal complexity by means of the Hardy-RamanujanRademacher formula and careful numerical evaluation. We provide open source implementations which run significantly faster than previously published software. The implementations are used for record computations of the partition function, including the tabulation of several billion Ramanujan-type congruences, and of Taylor series associated with the Riemann zeta function.

[1]  Peter Borwein Reduced complexity evaluation of hypergeometric functions , 1987 .

[2]  William Watkins,et al.  The minimal polynomial of cos(2π/n) , 1993 .

[3]  A Fast Numerical Algorithm for the Composition of Power Series with Complex Coefficients , 1986, Theor. Comput. Sci..

[4]  Donald E. Knuth,et al.  Notes on generalized Dedekind sums , 1977 .

[5]  Martin Ziegler,et al.  Fast (Multi-)Evaluation of Linearly Recurrent Sequences: Improvements and Applications , 2005, ArXiv.

[6]  Jonathan M. Borwein,et al.  Experimental Mathematics: Recent Developments and Future Outlook , 2000 .

[7]  Peter Borwein,et al.  An efficient algorithm for the Riemann zeta function , 1995 .

[8]  John E. Hopcroft,et al.  Duality Applied to the Complexity of Matrix Multiplication and Other Bilinear Forms , 1973, SIAM J. Comput..

[9]  P. Pollack The average least quadratic nonresidue modulo m and other variations on a theme of Erdős , 2012 .

[10]  Kevin James,et al.  Computing the integer partition function , 2007, Math. Comput..

[11]  Fredrik Johansson,et al.  A fast algorithm for reversion of power series , 2011, Math. Comput..

[12]  Richard P. Brent,et al.  Some New Algorithms for High-Precision Computation of Euler’s Constant , 1980 .

[13]  Ken Ono,et al.  Class polynomials for nonholomorphic modular functions , 2013, 1301.5672.

[14]  A. I. Bogolubsky,et al.  Fast evaluation of the hypergeometric function pFp−1(a; b; z) at the singular point z = 1 by means of the Hurwitz zeta function ζ(α, s) , 2006, Programming and Computer Software.

[15]  Jean-Luc Rémy,et al.  Arbitrary Precision Error Analysis for computing $\zeta(s)$ with the Cohen-Olivier algorithm: Complete description of the real case and preliminary report on the general case , 2006 .

[16]  A. J. Stothers On the complexity of matrix multiplication , 2010 .

[17]  Meagen M Rosenthal Curriculum vitae for , 2015 .

[18]  Charles Knessl,et al.  An effective asymptotic formula for the Stieltjes constants , 2011, Math. Comput..

[19]  Rick Kreminski Newton-Cotes integration for approximating Stieltjes (generalized Euler) constants , 2003, Math. Comput..

[20]  Daniel J. Bernstein Composing Power Series Over a Finite Ring in Essentially Linear Time , 1998, J. Symb. Comput..

[21]  T. Apostol Modular Functions and Dirichlet Series in Number Theory , 1976 .

[22]  Linas Vepstas An efficient algorithm for accelerating the convergence of oscillatory series, useful for computing the polylogarithm and Hurwitz zeta functions , 2007, Numerical Algorithms.

[23]  Marc Mezzarobba,et al.  A Note on the Space Complexity of Fast D-Finite Function Evaluation , 2012, CASC.

[24]  Joris van der Hoeven,et al.  Fast Evaluation of Holonomic Functions , 1999, Theor. Comput. Sci..

[25]  Georg Heinig,et al.  An inversion formula and fast algorithms for Cauchy-Vandermonde matrices , 1993 .

[26]  Richard P. Brent,et al.  The complexity of multiple-precision arithmetic , 2010, ArXiv.

[27]  Joachim von zur Gathen,et al.  Fast algorithms for Taylor shifts and certain difference equations , 1997, ISSAC.

[28]  Fredrik Johansson,et al.  Evaluating parametric holonomic sequences using rectangular splitting , 2013, ISSAC.

[29]  David M. Smith,et al.  Efficient multiple-precision evaluation of elementary functions , 1989 .

[30]  Joris van der Hoeven,et al.  Relax, but Don't be Too Lazy , 2002, J. Symb. Comput..

[31]  Fredrik Johansson,et al.  Efficient implementation of the Hardy-Ramanujan-Rademacher formula , 2012, 1205.5991.

[32]  K. Ono Distribution of the partition function modulo m , 2001 .

[33]  Gleb Beliakov,et al.  Zeroes of Riemann's zeta function on the critical line with 20000 decimal digits accuracy , 2011 .

[34]  David Harvey Faster algorithms for the square root and reciprocal of power series , 2011, Math. Comput..

[35]  Bruno Haible,et al.  Fast Multiprecision Evaluation of Series of Rational Numbers , 1998, ANTS.

[36]  Marc Mezzarobba,et al.  NumGfun: a package for numerical and analytic computation with D-finite functions , 2010, ISSAC.

[37]  Ken Ono,et al.  Algebraic formulas for the coefficients of half-integral weight harmonic weak Maass forms , 2011, 1104.1182.

[38]  H. Rademacher,et al.  Theorems on Dedekind Sums , 1941 .

[39]  Alfred V. Aho,et al.  Evaluating Polynomials at Fixed Sets of Points , 1975, SIAM J. Comput..

[40]  Juan Arias de Reyna,et al.  Asymptotics of Keiper-Li coefficients , 2011 .

[41]  J. Keiper,et al.  Power series expansions of Riemann’s function , 1992 .

[42]  Wolfram Koepf,et al.  Efficient Computation of Chebyshev Polynomials in Computer Algebra , 2003 .

[43]  Fredrik Johansson,et al.  A bound for the error term in the Brent-McMillan algorithm , 2013, Math. Comput..

[44]  Ghaith Ayesh Hiary,et al.  Fast methods to compute the Riemann zeta function , 2007, 0711.5005.

[45]  J. Borwein,et al.  Pi and the AGM: A Study in Analytic Number Theory and Computational Complexity , 1998 .

[46]  Robert L. Probert On the Additive Complexity of Matrix Multiplication , 1976, SIAM J. Comput..

[47]  Arnold Schönhage,et al.  Fast algorithms for multiple evaluations of the riemann zeta function , 1988 .

[48]  Hans Rademacher,et al.  On the Partition Function p(n) , 1938 .

[49]  C. Knessl,et al.  AN ASYMPTOTIC FORM FOR THE STIELTJES CONSTANTS γk(a) AND FOR A SUM Sγ(n) APPEARING UNDER THE LI CRITERION , 2011 .

[50]  Tony Feng,et al.  Riemann's Zeta Function , 2014 .

[51]  Fredrik Johansson,et al.  Arb: a C library for ball arithmetic , 2014, ACCA.

[52]  Carl-Erik Fröberg,et al.  The Stieltjes function—definition and properties , 1988 .

[53]  D. V. Chudnovsky,et al.  Approximations and complex multiplication according to Ramanujan , 2000 .

[54]  F. Olver Asymptotics and Special Functions , 1974 .

[55]  Christopher Umans,et al.  Fast Polynomial Factorization and Modular Composition , 2011, SIAM J. Comput..

[56]  Mark W. Coffey,et al.  An efficient algorithm for the Hurwitz zeta and related functions , 2009 .

[57]  Donald Ervin Knuth,et al.  The Art of Computer Programming, Volume II: Seminumerical Algorithms , 1970 .

[58]  Vincent Lefèvre,et al.  MPFR: A multiple-precision binary floating-point library with correct rounding , 2007, TOMS.

[59]  Éric Schost,et al.  Power series composition and change of basis , 2008, ISSAC '08.

[60]  William B. Hart,et al.  Fast Library for Number Theory: An Introduction , 2010, ICMS.

[61]  P. Hagis A root of unity occurring in partition theory , 1970 .

[62]  REMOVING REDUNDANCY IN HIGH-PRECISION NEWTON ITERATION , 2004 .

[63]  R. Weaver New Congruences for the Partition Function , 2001 .

[64]  D. J. Bernstein Fast multiplication and its applications , 2008 .

[65]  Richard P. Brent,et al.  Fast Multiple-Precision Evaluation of Elementary Functions , 1976, JACM.

[66]  THE MPFR LIBRARY: ALGORITHMS AND PROOFS , 2006 .

[67]  Fredrik Johansson,et al.  Rigorous high-precision computation of the Hurwitz zeta function and its derivatives , 2013, Numerical Algorithms.

[68]  Manuel Kauers,et al.  Automatic Classification of Restricted Lattice Walks , 2008, 0811.2899.

[69]  R. Gregory Taylor,et al.  Modern computer algebra , 2002, SIGA.

[70]  Xian-jin Li,et al.  The Positivity of a Sequence of Numbers and the Riemann Hypothesis , 1997 .

[71]  Victor Y. Pan,et al.  Fast Rectangular Matrix Multiplication and Applications , 1998, J. Complex..

[72]  Marc Mezzarobba,et al.  Autour de l'évaluation numérique des fonctions D-finies , 2011 .

[73]  On the series for the partition function , 1938 .

[74]  A. Odlyzko Asymptotic enumeration methods , 1996 .

[75]  D. H. Lehmer A Note on Trigonometric Algebraic Numbers , 1933 .

[76]  H. T. Kung,et al.  Fast Algorithms for Manipulating Formal Power Series , 1978, JACM.

[77]  Sven Köhler,et al.  On the Stability of Fast Polynomial Arithmetic , 2008 .

[78]  Richard P. Brent,et al.  Fast computation of Bernoulli, Tangent and Secant numbers , 2011, ArXiv.

[79]  Larry J. Stockmeyer,et al.  On the Number of Nonscalar Multiplications Necessary to Evaluate Polynomials , 1973, SIAM J. Comput..

[80]  E. A. Karatsuba FAST EVALUATION OF THE HURWITZ ZETA FUNCTION AND DIRICHLET L-SERIES , 1998 .

[81]  Richard P. Brent,et al.  The Complexity of computational problem solving , 1976 .

[82]  Albert Leon Whiteman,et al.  A SUM CONNECTED WITH THE SERIES FOR THE PARTITION FUNCTION , 1956 .

[83]  C. Pomerance,et al.  Prime Numbers: A Computational Perspective , 2002 .

[84]  Jonathan M. Borwein,et al.  Computational strategies for the Riemann zeta function , 2000 .

[85]  Jean-Michel Muller,et al.  Modern Computer Arithmetic , 2016, Computer.

[86]  Erich Kaltofen,et al.  On fast multiplication of polynomials over arbitrary algebras , 1991, Acta Informatica.

[87]  On the Hardy-Ramanujan Series for the Partition Function , 1937 .

[88]  G. Hardy,et al.  Asymptotic formulae in combinatory analysis , 1918 .