Here you find

- The HFLOAT package
- Links to other bignum packages
- Algorithms for pi & e
- Digits of pi
- Cryptic (arctan and ramanujanish) formulas

With hfloat you can compute pi to many million digits.

Please read whatfor.txt and hfloat.lsm

the doc is included, here: hfdoc.dvi.gz (dvi) hfdoc.ps.gz (postscript)

A comparison of the implemented algorithms to compute pi:

opcount-64k.txt (precision = 64k digits)

opcount-4M.txt (precision = 4M digits)

It is interesting that the AGM-algorithm
(with Schönhage's optimisations both of the sqrt and the AGM)
needs less than half of the multiplications than
(both variants of) Borwein's 4th order algorithm.

Log about the computation of 9**(9**9), done 22-November-1999 on an AMD K6/2 366Mhz: run1-pow999.txt. The computation took almost 8 hours as out of core FFTs had to be used. Note added 2010-October-25: log of a computation that took only 81 seconds run-pow999-ram.txt.

A text about the computation of pi:
arith.dvi.gz
(same as postscript: arith.ps.gz)

Some ideas used in hfloat are described in the slides of my talk "How to compute Pi to 10^12: A crash course in high precision arithmetics" given October-2003 in Bonn, Germany (gzip compressed): dvi (35kB), ps (170kB), or pdf (200kB). An updated version, given in Canberra, Australia (in two parts, April and May 2007) is here: dvi (36kB), ps (184kB), or pdf (204kB).

Don't miss the part on arithmetical algorithms of the fxtbook.

CLN
(by Bruno Haible, who also has a homepage),
includes GMP

This is probably the fastest and most complete bignum library available.

GiNaC ... is Not a CAS (Computer Algebra System), a very exciting software project by Christian Bauer, Alexander Frink and Richard Kreckel.

GMP
(by Torbjörn Granlund)

High-Precision Software Directory by D. H. Bailey.

pari/gp

My favorite for doing number theoretic tasks.

Sage Open Source Computer Algebra System. Highly recommended.

Maxima Open Source Computer Algebra System.

Axiom Open Source Computer Algebra System.

NTL (by Victor Shoup) A Library for doing Number Theory

A long list of number theoretic packages by Keith Matthews.

Printers version, the first 20000 decimal digits on 2 pages: pi20k.dvi.

The TeX source is here: pi20k.tex

**hexadecimal digits of pi**,
the first 65536 hexadecimal digits:
pihex64k.gz

- See the arith document.
- Compute the millionth hex digit of pi without computing all previous digits: C++ code, prints also binary and saves some table look up: pihex.cc.

- arctan formulas (dvi) (same as postscript) of the form $$ k\,\frac{\pi}{4}=\sum_{i=1}^{N}{m_i\,\ArcTan{x_i}} $$ (cf. also the arith document)
- big arctan formula bucket (dvi) (same as postscript)
- More arctan related formulas (dvi) (same as postscript)
- For the cryptic pi related formulas see the arith.*.gz text.

Your feedback is appreciated.

jj (Jörg Arndt)

Last modified 2019-September-22 (14:26)

Goto jj's ugly Homepage