Fast Multiple-Precision Evaluation of Elementary Functions

Let ƒ(<italic>x</italic>) be one of the usual elementary functions (exp, log, artan, sin, cosh, etc.), and let <italic>M</italic>(<italic>n</italic>) be the number of single-precision operations required to multiply <italic>n</italic>-bit integers. It is shown that ƒ(<italic>x</italic>) can be evaluated, with relative error <italic>&Ogr;</italic>(2<supscrpt>-<italic>n</italic></supscrpt>), in <italic>&Ogr;</italic>(<italic>M</italic>(<italic>n</italic>)log (<italic>n</italic>)) operations as <italic>n</italic> → ∞, for any floating-point number <italic>x</italic> (with an <italic>n</italic>-bit fraction) in a suitable finite interval. From the Schönhage-Strassen bound on <italic>M</italic>(<italic>n</italic>), it follows that an <italic>n</italic>-bit approximation to ƒ(<italic>x</italic>) may be evaluated in <italic>&Ogr;</italic>(<italic>n</italic> log<supscrpt>2</supscrpt>(<italic>n</italic>) log log(<italic>n</italic>)) operations. Special cases include the evaluation of constants such as π, <italic>e</italic>, and <italic>e</italic><supscrpt>π</supscrpt>. The algorithms depend on the theory of elliptic integrals, using the arithmetic-geometric mean iteration and ascending Landen transformations.

[1]  David M. Miller,et al.  Handbook of Mathematical Functions With Formulas, Graphs and Mathematical Tables (National Bureau of Standards Applied Mathematics Series No. 55) , 1965 .

[2]  Henry C. Thacher Iterated square root expansions for the inverse cosine and inverse hyperbolic cosine , 1961 .

[3]  Michael J. Fischer,et al.  Fast On-Line Integer Multiplication , 1974, J. Comput. Syst. Sci..

[4]  Milton Abramowitz,et al.  Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables , 1964 .

[5]  E. Salamin,et al.  Computation of π Using Arithmetic-Geometric Mean , 1976 .

[6]  P BrentRichard Fast Multiple-Precision Evaluation of Elementary Functions , 1976 .

[7]  Richard P. Brent,et al.  Recent technical reports , 1977, SIGA.

[8]  C. Truesdell,et al.  Partial Differential Equations and Continuum Mechanics. , 1962 .

[9]  William Gosper,et al.  Acceleration of Series , 1974 .

[10]  Daniel Shanks,et al.  Calculation of π to 100,000 Decimals , 1962 .

[11]  M. Abramowitz,et al.  Handbook of Mathematical Functions with Formulas, Graphs and Mathematical Tables. U.S. Department of Commerce, National Bureau of Standards , 1965 .

[12]  Donald E. Knuth The state of the Art of Computer Programming , 1976 .

[13]  Dura W. Sweeney On the computation of Euler’s constant , 1963 .

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

[15]  B. C. Carlson Algorithms Involving Arithmetic and Geometric Means , 1971 .

[16]  B. C. Carlson An Algorithm for Computing Logarithms and Arctangents , 1972 .

[17]  Donald Ervin Knuth,et al.  The Art of Computer Programming , 1968 .