High-Precision Software Directory

Updated: 3 November 2023


This website contains software written by David H. Bailey, either solely (items 1, 2, 3, 4 and 5) or in collaboration with other authors (items 6 and 7). Please send any comments or questions for this site to:

Here are the software packages that are available:
  1. MPFUN2020: A thread-safe arbitrary precision package with special functions.
  2. DQFUN: A double-quad precision package with special functions (approx. 66 digits).
  3. QXFUN: A quad precision package with special functions (approx. 33 digits).
  4. DDFUN: A double-double precision package with special functions (approx. 30 digits).
  5. MPFUN2015: An older thread-safe arbitrary precision package (new users should use MPFUN2020).
  6. ARPREC: An older arbitrary precision package for Fortran and C++ (new users should use MPFUN2020).
  7. QD: An older quad-double package (approx. 60 digits) for Fortran and C++ (new users should use DQFUN, QXFUN or DDFUN).
Detailed instructions:
  1. MPFUN2020: A thread-safe arbitrary precision package with special functions.

    This package permits one to perform floating-point computations (real and complex) to arbitrarily high numeric precision, by making only relatively minor changes to existing Fortran-90 programs (mostly changes to type statements). All basic arithmetic operations and transcendental functions are supported, together with numerous special functions.

    The package comes in two versions: one completely self-contained, all-Fortran version that is simple to install; and one version based on the MPFR package that is more complicated to install but runs somewhat faster on most applications. Both versions are completely thread-safe. Both versions also detect, and provide means to overcome, accuracy problems rooted in the usage of inexact double-precision constants and expressions. A high-level Fortran-90 interface, supporting both multiprecision real and complex datatypes, is provided for each, so that most users need only to make minor changes to existing double-precision code. The two versions are "plug-compatible" in the sense that applications written for one also run with the other (provided a simple guideline is followed).

    A technical paper describing the package and providing details for usage is available here: MPFUN2020 technical paper.

    *** IMPORTANT NOTE: Please read this license document carefully before using the MPFUN package: DHB-License.docx. By downloading or using this software you are agreeing to the modified BSD license that is in this file. If you wish to use this software for any commercial purpose, please contact the author.

  2. The two versions of the software are available here:

  3. DQFUN: A double-quad precision package with special functions (approximately 66 digit precision).

    This package permits one to perform floating-point computations (real and complex) to double-quad precision (approximately 65 digits), by making only relatively minor changes to existing Fortran programs. All basic arithmetic operations and transcendental functions are supported, together with numerous special functions. The package should run correctly on any Unix-based system supporting a Fortran-2008 compiler and IEEE 128-bit floating-point arithmetic (in hardware or software).

    Software for Unix-based systems (including Apple OS X systems): dqfun-v03.tar.gz

    For installation instructions, see this README file. The README file also includes a brief summary of programming instructions.

    *** IMPORTANT NOTE: Please read this license document carefully before using the DQFUN package: DHB-License.docx. By downloading or using this software you are agreeing to the modified BSD license that is in this file. If you wish to use this software for any commercial purpose, please contact the author.

  4. QXFUN: A quad precision package with special functions (approximately 33 digit precision).

    This package enhances an IEEE quad precision floating-point facility (approx. 33 digit accuracy) to include a library of numerous special functions, all by making only very minor changes to existing Fortran programs. The package should run correctly on any Unix-based system supporting a Fortran-2008 compiler and IEEE 128-bit floating-point arithmetic, in hardware or software.

    Software for Unix-based systems (including Apple OS X systems): qxfun-v01.tar.gz

    For installation instructions, see this README file. The README file also includes a brief summary of programming instructions.

    *** IMPORTANT NOTE: Please read this license document carefully before using the DQFUN package: DHB-License.docx. By downloading or using this software you are agreeing to the modified BSD license that is in this file. If you wish to use this software for any commercial purpose, please contact the author.

  5. DDFUN: A double-double package with special functions (approximately 30 digit precision).

    This package permits one to perform floating-point computations (real and complex) to double-double precision (approximately 30 digits), by making only relatively minor changes to existing Fortran programs. It is intended as a substitute for IEEE 128-bit quad precision on systems where quad precision is not available. All basic arithmetic operations and transcendental functions are supported, together with numerous special functions. The package should run correctly on any Unix-based system supporting a Fortran-2008 compiler and IEEE 64-bit floating-point arithmetic.

    Software for Unix-based systems (including Apple OS X systems): ddfun-v03.tar.gz

    For installation instructions, see this README file. The README file also includes a brief summary of programming instructions.

    *** IMPORTANT NOTE: Please read this license document carefully before using the DQFUN package: DHB-License.docx. By downloading or using this software you are agreeing to the modified BSD license that is in this file. If you wish to use this software for any commercial purpose, please contact the author.

  6. MPFUN2015: An older thread-safe arbitrary precision package.

    This is an older all-Fortran version of the MPFUN software, based on floating-point arithmetic. It is several times slower than MPFUN2020. This version is still supported, but MPFUN2020 should be used for new development.

    A technical paper describing the package and providing details for usage is available here: MPFUN2015 technical paper.

    *** IMPORTANT NOTE: Please read this license document carefully before using the MPFUN package: DHB-License.docx. By downloading or using this software you are agreeing to the modified BSD license that is in this file. If you wish to use this software for any commercial purpose, please contact the author.

  7. The software is available here:

  8. ARPREC: An arbitrary precision package for Fortran and C++.

    This package is an older arbitrary precision package. It is not thread-safe, but, unlike MPFUN2020, is available with both a Fortran-90 and a C++ high-level interface.

    ARPREC for Unix-based systems (including Apple OS X systems): arprec-2.2.20.tar.gz

    Note: On some systems, notably a Mac with Safari, the browser may automatically unzip the file as it downloads it. In that case, you may need to rename the file, say from "arprec-2.2.20.tar.gz" to "arprec-2.2.20.tar" before proceeding.

    *** IMPORTANT NOTE: David H. Bailey offers this software on this site as a convenience, but does NOT assume any responsibility for maintenance or managing appropriate usage. Please read this license document carefully before using: LBNL-BSD-License.docx. By downloading or using this software you are agreeing to the modified BSD license that is in this file. If you wish to use this software for any commercial purpose, please contact the Intellectual Property Office at the Lawrence Berkeley National Laboratory, ipo@lbl.gov.

  9. QD: A double-double and quad-double package for Fortran and C++.

    This package is an older package that provides double-double (approximately 31-digit precision) and quad-double (approximately 62-digit precision) functionality. It is not thread-safe, but, unlike MPFUN2020, is available with both a Fortran-90 and a C++ high-level interface.

    QD for Unix-based systems (including Apple OS X systems): qd-2.3.24.tar.gz

    Note: On some systems, notably a Mac with Safari, the browser may automatically unzip the file as it downloads it. In that case, you may need to rename the file, say from "qd-2.3.24.tar.gz" to "qd-2.3.24.tar" before proceeding.

    *** IMPORTANT NOTE: David H. Bailey offers this software on this site as a convenience, but does NOT assume any responsibility for maintenance or managing appropriate usage. Please read this license document carefully before using: LBNL-BSD-License.docx. By downloading or using this software you are agreeing to the modified BSD license that is in this file. If you wish to use this software for any commercial purpose, please contact the Intellectual Property Office at the Lawrence Berkeley National Laboratory, ipo@lbl.gov.