The HFLOAT library: fast computations with extreme precision.


Here you find

The HFLOAT package

The HUGE-FLOAT package It's for computations with very long (huge!) floating point numbers.
With hfloat you can compute pi to many million digits.
Latest HFLOAT version: hfloat-2012.11.17.tgz (approx. 600k), distributed under the GPL. hfloat uses fft-multiplication, therefore you need fxt in order to compile it. Currently changes happen mostly in fxt, new hfloat versions are released mainly in order to keep versions in sync.
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.



Other bignum packages

apfloat by Mikko Tommila.

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.

LibTom
Extended precision routines geared for number theoretic applications like public key cryptography. The site has a book covering the algorithms used, available for free download.

Sage Open Source Computer Algebra System. Highly recommended.

A well maintained list of Computer Algebra Software.

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.


3.14159265358979323846264338...

- parental warning: explicit numbers -

Decimal digits of pi, The first 65536 decimal digits: pidec64k.gz
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


Constants to many digits can be found in here


How to Compute pi & e


Completely useless formulas

NOTE: For arctan formulas see also the arctan page.
Your feedback is appreciated.
jj (Jörg Arndt)

Last modified 2012-November-17 (19:51)
Goto jj's ugly Homepage