skip to main content
research-article

Algorithm 910: A Portable C++ Multiple-Precision System for Special-Function Calculations

Published: 01 February 2011 Publication History

Abstract

This article presents a portable C++ system for multiple precision calculations of special functions called e_float. It has an extendable architecture with a uniform C++ layer which can be used with any suitably prepared MP type. The system implements many high-precision special functions and extends some of these to very large parameter ranges. It supports calculations with 30 ⋯ 300 decimal digits of precision. Interoperabilities with Microsoft’s® CLR, Python, and Mathematica® are supported. The e_float system and its usage are described in detail. Implementation notes, testing results, and performance measurements are provided.

Supplementary Material

ZIP File (910.zip)
Software for A Portable C++ Multiple-Precision System for Special-Function Calculations

References

[1]
Abrahams, D. 2008. boost.python Index. http://www.boost.org/doc/libs/1_42_0/libs/python/.
[2]
Abramowitz, M. and Stegun, I. A. 1972. Handbook of Mathematical Functions 9th Ed. Dover Publications, New York, NY.
[3]
Amos, D. E. 1986. A portable package for Bessel functions of a complex argument and nonnegative order. ACM Trans. Math. Softw. 12, 3, 265--273.
[4]
Andrews, G., Askey, R., and Roy, R. 2000. Special Functions. Cambridge University Press, Cambridge, UK.
[5]
Arndt, J. and Haenel, C. 2000. π Unleashed. Springer, New York, NY.
[6]
Bailey, D., Borwein, J. M., Calkin, N. J., Girgensohn, R., Luke, D., and Moll, V. H. 2007. Experimental Mathematics in Action. A.K. Peters Press, Natick, MA.
[7]
Bailey, D. H. 1993. Multiprecision translation and execution of Fortran programs. ACM Trans. Math. Softw. 19, 3, 288--319.
[8]
Bailey, D. H. 1995. A Fortran 90--based multiprecision system. ACM Trans. Math. Softw. 21, 4, 379--387.
[9]
Bailey, D. H. and Broadhurst, D. J. 2000. Parallel integer relation detection: Techniques and applications. Math. Comp. 70, 1719--1736.
[10]
Bailey, D. H., Hida, Y., Li, X. S., and Thompson, B. 2002. ARPREC: An arbitrary precision computation package. Tech. rep. Lawrence Berkeley National Laboratory, Berkeley, CA.
[11]
Becker, P. 2006. The C++ Standard Library Extensions: A Tutorial and Reference. Addison Wesley, Reading, MA.
[12]
Borwein, P. 1995. An efficient algorithm for the Riemann zeta function. Can. Math. Soc. Conf. Proc. 27, 29--34.
[13]
Brent, R. P. 1978. A Fortran multiple-precision arithmetic package. ACM Trans. Math. Softw. 4, 1, 57--70.
[14]
Cody, W. J. 1993. SPECFUN---A portable Fortran package of special function routines and test drivers. ACM Trans. Math. Softw. 19, 1, 22--30.
[15]
Cody, W. J. and Waite, W. 1980. Software Manual for the Elementary Functions. Prentice-Hall, Englewood Cliffs, New Jersey.
[16]
Erdélyi, A., Magnus, W., Oberhettinger, F., and Tricomi, F. G. 1981. Higher Transcendental Functions. Vols. 1--2. Krieger, New York, NY.
[17]
Espinosa, O. and Moll, V. H. 2004. A generalized polygamma function. Integral Trans. Special Func. 15, 101--115.
[18]
Finch, S. R. 2003. Mathematical Constants. Cambridge University Press, Cambridge, UK.
[19]
Foord, M. J. and Muirhead, C. 2009. IronPython in Action. Manning Publications, Greenwich, CT.
[20]
Fousse, L., Hanrot, G., Lefèvre, V., Pélissier, P., and Zimmermann, P. 2007. MPFR: A multiple--precision binary floating-point library with correct rounding. ACM Trans. Math. Softw. 33, 2, 1--15.
[21]
Galassi, M., Davies, J., Theiler, J., Gough, B., Jungman, G., Alken, P., Booth, M., and Rossi, F. 2009. GNU Scientific Library Reference Manual, for Version 1.12 3rd Ed. Network Theory Ltd., Bristol, UK.
[22]
GCC. 2009. The GNU Compiler Collection Version 4.4.2. Free Software Foundation. http://gcc.gnu.org/.
[23]
Gil, A., Segura, J., and Temme, N. M. 2006. Computing the real parabolic cylinder functions U(a, x), V(a, x). ACM Trans. Math. Softw. 32, 1, 70--101.
[24]
Gil, A., Segura, J., and Temme, N. M. 2007. Numerical Methods for Special Functions. SIAM, Philadelphia, PA.
[25]
Gladman, B. 2008. Building GMP and MPFR with Microsoft® Visual Studio 2008 and YASM. http://gladman.plushost.co.uk/oldsite/computing/gmp4win.php.
[26]
GMP. 2008. GNU Multiple Precision Arithmetic Library Version 4.2.4. Free Software Foundation. http://gmplib.org/.
[27]
GNU. 2006. GNUmake Version 3.81. Free Software Foundation. http://www.gnu.org/software/make/.
[28]
Gourdon, X. and Sebah, P. 2008. Numbers, Constants and Computation. http://numbers.computation.free.fr/.
[29]
Intel. 2008. Intel® C++ Compiler Professional Edition. http://software.intel.com/en-us/intel-compilers/.
[30]
ISO. 2003. ISO/IEC 14882:2003: Information Technology---Programming Languages---C++. International Organization for Standardization, Geneva, Switzerland.
[31]
ISO. 2006a. ISO/IEC 23270:2006: Information Technology Programming Languages---C#. International Organization for Standardization, Geneva, Switzerland.
[32]
ISO. 2006b. ISO/IEC 23271:2006: Information Technology Programming Languages---Common Language Infrastructure (CLI) Partitions I to VI. International Organization for Standardization, Geneva, Switzerland.
[33]
ISO. 2007. ISO/IEC 19768:2007: Information Technology---Programming Languages---Technical Report on C++ Library Extensions. International Organization for Standardization, Geneva, Switzerland.
[34]
Jahnke, E. and Emden, F. 1945. Tables of Functions with Formulae and Curves 4th Ed. Dover, New York, NY.
[35]
Josuttis, N. M. 1999. The C++ Standard Library: A Tutorial and Reference. Addison Wesley, Reading, MA.
[36]
King, L. V. 1924. On the Direct Numerical Calculation of Elliptic Functions and Integrals. Cambridge University Press, Cambridge, UK.
[37]
Knuth, D. E. 1998. The Art of Computer Programming Vols. 1--3 2nd Ed. Addison Wesley, Reading, MA.
[38]
Luke, Y. L. 1977. Algorithms for the Computation of Mathematical Functions. Academic Press, New York, NY.
[39]
Microsoft. 2008. Microsoft® Visual Studio Professional 2008. http://www.microsoft.com/visualstudio/.
[40]
Microsoft. 2009a. IronPython. http://www.ironpython.net/.
[41]
Microsoft. 2009b. NMAKE Reference. http://msdn.microsoft.com/en-us/library/dd9y37ha(VS.71).aspx.
[42]
Microsoft. 2010. Common Language Runtime Overview. http://msdn.microsoft.com/en-us/library/ddk909ch.aspx.
[43]
MISRA. 2004. MISRA--C 2004: Guidelines for the Use of the C Language in Critical Systems. http://www.misra.org.uk/.
[44]
MISRA. 2008. MISRA--C++ 2008: Guidelines for the Use of the C++ Language in Critical Systems. http://www.misra-cpp.org/.
[45]
MPMATH. 2009. Python Library for Arbitrary-Precision Floating-Point Arithmetic. http://code.google.com/p/mpmath/.
[46]
Oldham, K., Myland, J., and Spanier, J. 2009. An Atlas of Functions 2nd Ed. Springer, New York.
[47]
Olver, F. W. J. 1997. Asymptotics and Special Functions. A.K. Peters Press, Natick MA.
[48]
Press, W. H., Teukolsky, S. A., Vetterling, W. T., and Flannery, B. P. 2002. Numerical Recipes in C++ 2nd Ed. Cambridge University Press, Cambridge, UK.
[49]
PSF. 2009. Python Programming Language---Official Website. http://www.python.org/.
[50]
Richter, J. 2006. CLR Via C# 2nd Ed. Microsoft Press, Redmond, WA.
[51]
Shoup, V. 2008. NTL: A Library for Doing Number Theory. http://www.shoup.net/ntl/.
[52]
Sloane, N. J. A. 2009. Online Encyclopedia of Integer Sequences. http://www.research.att.com/~njas/sequences/.
[53]
Smith, D. 1991. A Fortran package for floating-point multiple-precision arithmetic. ACM Trans. Math. Softw. 17, 2, 273--283.
[54]
Smith, D. 1998. Multiple-precision complex arithmetic and functions. ACM Trans. Math. Softw. 24, 4, 359--367.
[55]
Temme, N. M. 1975. On the numerical evaluation of the modified Bessel function of the third kind. J. Comp. Phys. 19, 324.
[56]
Temme, N. M. 2007. Personal communications. 2007--2009.
[57]
Vepštas, L. 2008. An efficient algorithm for accelerating the convergence of oscillatory series, useful for computing the polylogarithm and Hurwitz zeta functions. Numer. Algor. 47, 3, 211--252.
[58]
Watson, G. N. 1995. A Treatise on the Theory of Bessel Functions. Cambridge University Press, Cambridge, UK.
[59]
Weisstein, E. W. 2010. MathWorld® --A Wolfram Web Resource. http://mathworld.wolfram.com/.
[60]
Wikipedia. 2009. Wikipedia---The Free Encyclopedia. http://en.wikipedia.org/wiki/.
[61]
Wimp, J. 1984. Computation with Recurrence Relations. Pitman Publishing, London, UK.
[62]
Wolfram, S. 1999. The Mathematica® Book 4th Ed. Cambridge University Press, Cambridge, UK.
[63]
Wolfram Research. 2010. The Wolfram Functions Site. http://functions.wolfram.com/.
[64]
Zhang, S. and Jin, J. 1996. Computation of Special Functions. Wiley, New York, NY.

Cited By

View all
  • (2017)Software Numerical Instability Detection and Diagnosis by Combining Stochastic and Infinite-Precision TestingIEEE Transactions on Software Engineering10.1109/TSE.2016.264295643:10(975-994)Online publication date: 1-Oct-2017
  • (2014)Equivalent polynomials for quadrature in Heaviside function enriched elementsInternational Journal for Numerical Methods in Engineering10.1002/nme.4679102:3-4(688-710)Online publication date: 13-May-2014

Recommendations

Reviews

Todor Todorov

Kormanyos presents a portable C++ system for multiple precision calculations. The system supports calculations with 30 to 300 decimal digits of precision, and interoperability with Microsoft's Common Language Runtime (CLR), Python, and Mathematica. The author presents the system architecture in great detail, as well as some software realizations of the calculation algorithms. A detailed discussion of interoperability follows, including test results and performance analysis, with three examples: Python, Microsoft CLR Export, and computer algebra systems. Finally, for future work, the author mentions increasing the extension to 1,000-digits, which will be quite interesting and useful. I recommend this paper to anybody interested in high-precision calculations and their software implementation. Online Computing Reviews Service

Access critical reviews of Computing literature here

Become a reviewer for Computing Reviews.

Comments

Information & Contributors

Information

Published In

ACM Transactions on Mathematical Software  Volume 37, Issue 4
February 2011
212 pages
ISSN:0098-3500
EISSN:1557-7295
DOI:10.1145/1916461
Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 February 2011
Accepted: 01 October 2010
Revised: 01 July 2010
Received: 01 July 2009
Published in TOMS Volume 37, Issue 4

Permissions

Request permissions for this article.

Check for updates

Badges

Author Tags

  1. Airy
  2. Bessel
  3. C++
  4. Hermite
  5. Laguerre
  6. Legendre
  7. elliptic integrals
  8. gamma
  9. generic programming
  10. hypergeometric
  11. multiple precision
  12. object oriented
  13. orthogonal polynomials
  14. parabolic cylinder
  15. polylogarithm
  16. polymorphism
  17. special functions
  18. zeta

Qualifiers

  • Research-article
  • Research
  • Refereed

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)13
  • Downloads (Last 6 weeks)3
Reflects downloads up to 07 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2017)Software Numerical Instability Detection and Diagnosis by Combining Stochastic and Infinite-Precision TestingIEEE Transactions on Software Engineering10.1109/TSE.2016.264295643:10(975-994)Online publication date: 1-Oct-2017
  • (2014)Equivalent polynomials for quadrature in Heaviside function enriched elementsInternational Journal for Numerical Methods in Engineering10.1002/nme.4679102:3-4(688-710)Online publication date: 13-May-2014

View Options

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy