High-Precision Computation of Uniform Asymptotic Expansions for Special Functions Guillermo Navas-Palencia
Total Page:16
File Type:pdf, Size:1020Kb
UNIVERSITAT POLITÈCNICA DE CATALUNYA Department of Computer Science High-precision Computation of Uniform Asymptotic Expansions for Special Functions Guillermo Navas-Palencia Supervisor: Argimiro Arratia Quesada A dissertation submitted in fulfillment of the requirements for the degree of Doctor of Philosophy in Computing May 7, 2019 i Abstract In this dissertation, we investigate new methods to obtain uniform asymptotic ex- pansions for the numerical evaluation of special functions to high-precision. We shall first present the theoretical and computational fundamental aspects required for the development and ultimately implementation of such methods. Applying some of these methods, we obtain efficient new convergent and uniform expan- sions for numerically evaluating the confluent hypergeometric functions 1F1(a; b; z) and U(a, b, z), and the Lerch transcendent F(z, s, a) at high-precision. In addition, we also investigate a new scheme of computation for the generalized exponential integral En(z), obtaining one of the fastest and most robust implementations in double-precision arithmetic. In this work, we aim to combine new developments in asymptotic analysis with fast and effective open-source implementations. These implementations are com- parable and often faster than current open-source and commercial state-of-the-art software for the evaluation of special functions. ii Acknowledgements First, I would like to express my gratitude to my supervisor Argimiro Arratia for his support, encourage and guidance throughout this work, and for letting me choose my research path with full freedom. I also thank his assistance with admin- istrative matters, especially in periods abroad. I am grateful to Javier Segura and Amparo Gil from Universidad de Cantabria for inviting me for a research stay and for their inspirational work in special func- tions, and the Ministerio de Economía, Industria y Competitividad for the financial support, project APCOM (TIN2014-57226-P), during the stay. Special thanks go to my colleges at Numerical Algorithms Group from whom I learned many impor- tant aspects in the development of numerical software, and to Fredrik Johansson for fruitful and interesting discussions, and for his remarkable work developing tools for arbitrary-precision arithmetic. Finally, I would like to thank my mother for her patience and support, and Regina for her encouragement, appreciation and understanding of the effort re- quired to complete this work. iii Contents Abstracti Acknowledgements ii List of Figuresv List of Tables vi Introduction1 1 Analytic and Numerical Methods for Special Functions4 1.1 Analytic methods and asymptotic expansions..............4 1.1.1 Introduction.............................4 1.1.2 Asymptotic methods for integrals................5 Watson’s lemma..........................5 Laplace’s method and saddle point method...........6 1.1.3 Uniform expansions for Laplace-type integrals.........7 1.2 Numerical Methods.............................7 1.2.1 Quadrature methods........................8 1.2.2 Continued fractions........................8 1.2.3 Sequence acceleration techniques.................9 1.2.4 Other methods........................... 10 2 Software Development for the Numerical Evaluation of Special Functions 11 2.1 Arbitrary-precision arithmetic....................... 11 2.1.1 Algorithms............................. 11 2.1.2 Libraries............................... 12 2.2 Floating-point arithmetic.......................... 13 2.2.1 Definitions and basic notation.................. 13 2.2.2 Floating-point expansions and error-free transformation... 16 Basic algorithms.......................... 16 2.2.3 DD vs MPFR for the evaluation of Riemann zeta function.. 17 Borwein’s algorithms........................ 18 Implementation and benchmarks................. 19 2.3 Development of numerical libraries in floating-point precision.... 21 2.3.1 Numerical libraries and compilers................ 21 2.3.2 Design of software for computing special functions...... 23 2.3.3 Testing methodologies....................... 26 2.3.4 Benchmarking methodologies.................. 28 2.4 GNSTLIB project.............................. 29 iv 2.4.1 Introduction............................. 29 2.4.2 Efficient vectorization via generalized power series...... 30 2.4.3 Benchmarks............................. 32 Vectorized exponential integral E1(x) .............. 32 Exponential integral E1(x) ..................... 33 Exponential integral Ei(x) ..................... 34 3 Fast and Accurate Algorithm for the Generalized Exponential Integral for positive real order 36 3.1 Introduction................................. 36 3.2 Methods of computation.......................... 38 3.2.1 Special values............................ 38 3.2.2 Series expansions.......................... 38 Series in terms of the confluent hypergeometric function... 39 Laguerre series........................... 40 Taylor series for 1 x < 2..................... 42 ≤ Series expansions: special cases.................. 44 3.2.3 Asymptotic expansions...................... 46 Large x and fixed n ......................... 46 Large n ................................ 46 Large n and fixed x ......................... 48 3.3 Other numerical methods......................... 51 3.3.1 Factorial series........................... 51 3.3.2 Continued fractions........................ 51 3.3.3 Numerical integration....................... 52 Other integrals........................... 53 3.4 Algorithm and implementation...................... 53 3.4.1 Algorithm for integer order.................... 55 3.4.2 Algorithm for real order...................... 56 3.5 Benchmarks................................. 56 3.5.1 Arbitrary-precision floating-point libraries........... 59 3.6 Conclusions................................. 60 4 Confluent Hypergeometric Functions 62 4.1 Background and Previous Work...................... 62 4.1.1 Confluent hypergeometric function of the first and second kind 63 4.1.2 Computational methods and available software........ 64 4.1.3 Applications............................. 70 4.2 On the Computation of Confluent Hypergeometric Functions for Large Imaginary Part of Parameters b and z.................. 77 4.2.1 Introduction............................. 77 4.2.2 Algorithm.............................. 78 Path of steepest descent...................... 78 Case U(a, b, z), =(z) ! ¥ .................... 79 Case U(a, b, z), =(b) ! ¥ .................... 79 Case 1F1(a, b, z), =(z) ! ¥ ................... 80 Case 1F1(a, b, z), =(b) ! ¥ ................... 80 4.2.3 Numerical quadrature schemes.................. 80 v Adaptive quadrature for oscillatory integrals.......... 80 Gauss-Laguerre quadrature.................... 81 4.2.4 Numerical examples........................ 82 4.2.5 Applications............................. 83 4.2.6 Conclusions............................. 85 4.3 High-precision Computation of the Confluent Hypergeometric Func- tions via Franklin-Friedman Expansion................. 86 4.3.1 Introduction............................. 86 4.3.2 The Franklin-Friedman expansion................ 87 4.3.3 The expansion for U(a, b, z) .................... 89 4.3.4 The Franklin-Friedman expansion coefficients......... 90 Analysis of the coefficients ck(z) ................. 92 4.3.5 Efficient computation of U(a, b, z) ................ 97 4.3.6 Numerical experiments...................... 99 4.3.7 Discussion.............................. 101 5 The Lerch Transcendent and Other Special Functions in Analytic Number Theory 103 5.1 Background................................. 103 5.1.1 Special number and polynomials................. 103 Bernoulli numbers and polynomials............... 103 Euler numbers and polynomials................. 106 Stirling numbers and polynomials................ 106 Other special numbers and polynomials............. 108 5.1.2 The Lerch transcendent and related functions......... 110 5.1.3 Software............................... 112 5.1.4 Applications............................. 112 5.2 Numerical Methods and Arbitrary-Precision Computation of the Lerch Transcendent................................. 114 5.2.1 Introduction............................. 114 5.2.2 Numerical methods........................ 115 Euler-Maclaurin formula..................... 115 Uniform asymptotic expansion for F(z, s, a) .......... 119 Asymptotic expansion for large z................. 122 5.2.3 Algorithmic details and implementation............ 125 Evaluation of L-series....................... 126 Evaluation of the Euler-Maclaurin error bound......... 127 Evaluation of the Euler-Maclaurin tail.............. 129 Evaluation of asymptotic expansions.............. 130 Numerical integration....................... 132 5.2.4 Benchmark............................. 132 5.2.5 Discussion.............................. 135 5.2.6 Appendix - Algorithms and implementations......... 136 L-series................................ 136 Euler-Maclaurin formula..................... 137 Asymptotic expansions...................... 138 vi List of Figures 2.1 Timing of the three methods in microseconds............... 19 2.2 Timing in microseconds for 106-bit precision vs MPFR 3.1.4. MPFR caches intermediate results for s 50, 60, 70 .............. 21 2 f g 2.3 Relative errors checked with Mathematica. Maximum relative error 0.8e .................................... 22 ≈ dd 2.4 Decision tree generated with several methods to compute the gener- alized exponential integral for real order and argument. Detail with the first two split