All formulas
Num. approx.
Misc. math.
Delirium !

Boris Gourévitch
The world of Pi - V2.57
modif. 13/04/2013

Home Version history Guestbook Who I am Some pictures (fr) Acknowledgements Last modifications Contact

Cette page en français This page in English

Programs on Pi

note: this page has not been updated in years so that it is likely that many links are broken. I promise that I'm going to work on it soon. If you know some links towards some programs, do not hesitate to contact me.

All good respectable sites on Pi must have a page on computer programs! Thanks or due to the use of computers, many good algorithm appeared since the one of Salamin in 1976. They were helped with the utilisation of multiplication method that are always faster, O(n.log(n)), and derivation of the FTT.
The progress in the calculation of decimals was also momentus. But Kanada and the Chudnovsky are not, as we tend to think, the only one capable of writting efficients programs. It has even became an international sport. So Carey Bloodworth and Xavier Gourdon to name but a few that regularly surpass each other and offer two software that are even more performant than the one used by Kanada!
We now find programs for all platforms, and that the goal of this page. From 100 decimals to to several hundreds of millions, I hope you will find your happiness!
Note that this page is only at it's beginning of its creation and that other web address and programs will come to enrich this page soon.

PiFast 3.2













Classes Java



The princes of calculations

First of all, two programs shine from the rest. The first is the fastest and the second is nearly as good but more importantly available on all platforms!

PiFast 3.2 by Xavier Gourdon

Xavier Gourdon's Page - Download
This perpetual evolving program was developed by a french. The program is based on Chudnovsky's series (convergence 14n) and used of course on the fast Fourier transformation for the multiplications.  The satisfication is assured by Ramanujan's formula (convergence 8n). This program holds the record of numbers of decimals calculated by a particular on a PC, here is the detailed table for the version 3.1:

Number of decimals




Machine (procesor, memory)

Version of PiFast


Shigeru Kondo

246 hours

13 Nov 1999

PIII 550 (1024 Mo)



Shigeru Kondo

245 hours

19 Oct 1999

PIII 550 (1024 Mo)



Shigeru Kondo

157 hours

13 Sep 1999

PIII 550 (1024 Mo)



Shigeru Kondo

119 hours

29 Aoû 1999

PIII 550 (1024 Mo)



Shigeru Kondo

63.5 hours

13 Aoû 1999

PIII 550 (1024 Mo)



Stuart Lyster

32 h 40 min

13 Aoû 1999

PII 300 (128 Mo)



Shigeru Kondo

2 h 45 min.

4 Aoû 1999

PIII 550 (1024 Mo)



Stuart Lyster

8 h 18 min

30 Jul 1999

PII 300 (128 Mo)



Stuart Lyster

19 h 12 min

21 Jul 1999

PII 300 (128 Mo)


according to the table by Xavier Gourdon

I strongly urge you to go and check Xavier Gourdon's page, he explains  quite a few things on fast Fourier transformation and on the computer's calculations of the most famous constants....

PiAGM by Carey Bloodworth

C. Bloodworth's page - The downloading of the program are regrouped by platforms below....
Carey is a programer veteran in the calculation of Pi since his first version of his famous software PiAGM dates from 1996. At the time, his ambition was to calculate 1 million decimals with a 386 procesor in one day, memorable event!
Since, the program developed well but stayed centered on Salamin's algorithm, which justify the average geometric mean (AGM). Of course, we find again the use of FFT for the multiplication of long integers. But the originality of PiAGM consist to offer the calculation with a packet of varients for the FFT. Your choice! You will find their description on the nearly-official page for the program.
the software is slightly slower than PiFast, but an other advantage, is that it is available on nearly all platforms on sale and available with its source code. The archives are most of the time in tar/gzip unless mention otherwised.

The OS junks

To please all possible system, here is most of the best programs for the various platform. The download links brings you, most of the time, to the program on the authors page, since I don;t have enough space on my account.
But if a link doesn't work, ask me to send you the program, I still have them on my hard drive. Don't hesitate!
Ah, one more thing, I choosed to differentiate between specific platform related software and source code which can be compiled on any machine. So that you don't end up like me with the joy of down;oading something and finding that it does not work due to having no compilers!


Praise to my favourite computer... Here are only the programs with a Mac exe. You are then free to complile the C sources written further down, but they are not platform specific programs anymore.


PiAGM - Carey Bloodworth
Author's Page - Download

PiPrimes - Isabel Georges
Author's address - Download
A great surprise, this program. Too bad, that it doesn't go past 29000 decimals.... It uses the MPFUN package, by David Bailey, which understand the routines of precise arithmetic calculations.

CalculatePi version 1.5 - Carey Bloodworth
Archive page - Download
Came out the 2/17/95, the program is optimised PowerPC and uses the formula
Pi/4 = 6 tan-1(1/8) + 2 tan-1(1/57) + tan-1(1/239) .
But not FFT for such.... 20000 decimals in 30 seconds, but a calculation time of n2

Buffon Needle - George Reese
Author's Page - Download
As the name implies, this program estimate Pi using the needles method by Buffon, Of course, do not hope for many decimals, but it's a nice computing adaptation.

Pi and e - J.F. Pautex
Author's Page - Download
Not an easy to use interface, but a program that works and also allows the calculation of e.

Performances - G3 266MHz 128Mo RAM MacOS 8.6

  10000 decimals
PiAGM <2 secondes
PiPrimes 5 secondes
CalculatePi 8 secondes
Pi and e 56 secondes
Buffon Needle !

MacOS X Server

PiAGM - Carey Bloodworth
Author's Page - Download


The page by Stuart Lyster and Dara are without doubts the best site in English dedicated to programs calculating Pi. To establish a comparison of the programs, no need to think too hard, better check out the manificant tables they made. I can only strongly suggest that you go and see their page.
Otherwise, here is a big list of programs followed by a small glimpse of their performance, make your choice! Except for superpi, it seems to me that all the other programs come with their source code, more often than not in C/C++.

Pifast 3.2 - Xavier Gourdon
Author's Page - Download
See above!

Pi_css4.exe - Takuya Ooura
Author's Page - Download
Uses FFT and AGM. The base of the FFT uses is 8,4,2

Piologie_pi.zip - Sebastian Wedeniwski
Author's mail - Download
Based on piologie, a library of arithmetic functions

PI4.EXE - Giovanni Ciampa
Author's mail - Download
Uses the code written by Takuya Ooura from Tokyo university. Pi4.exe uses a FFT of base 4, 2

GioPi - Giovanni Ciampa
Author's mail - Download
A program that seems different from the one mentioned in the table. It is based on the Arctan formula and comes from the world of Atari in which he got a few rewards.

Ahppi.exe - Alan Pittman
Author's mail - Download
Program XMPPI using the FFT and comes with a source c and its exe in DOS.

Aptest.exe - Mikko Tommila
Author's Page - Download
Part of the set of programs of APFLOAT calculation on the Tommila's integers.

Superpi.exe - Yasumasa Kanada
Author's Page - Download
Its a variance of the famous program that holds the record of calculation decimals i.e. 206,158,430,000 decimals in Sept 1999. But this programs only goes up to 33.5 million decimals

Pi Program - Terj Mathisen
This program is based on the Arctan serie and has the particularity to have been written in assembly language, and the code comes with the exe in DOS.

Pi Bellard - Fabrice Bellard
Author's Page - Download
Here is our national hacker working for this good exe using an Arctan serie and FFT. Great quantity of decimals and a working time nearly-linear!

Pi dpmi - Dario Alpern
Author's Page - Download
A program written in assembler 386 which calculate at the same time e and ln(2). For Pi, it uses an arctan formula.

Pi dpm - Jan Kraak
Author's mail - Download
A variante of the previous program but this time using Machin formula. This doesn't remove any practicality of the program

WinPi - Martin Mamo
Author's Page - Download
A well known but slow program. It is the result of another exe on Sun and is based on the Arctan formula by Klingstierna.

PiW - Harry Smith
Author's mail - Download
A very slow program but well documented with it's source code. It uses an Arctan formula.

Exactly 1 million of decimals with this program you will get, Yoda said.


While waiting that I do my own trials, here are those made by Stuart Lyster and Dara. It also contains the programs compiled from the source code available lower down.

  On a Pentium II 300MHz / 128Mo RAM






Maximum number of decimals


PiFast.EXE ver 2.2 4.56 secs 52.01 secs.


24 gigs
  with ver 3.1


PI_CSS4.EXE 10 111 secs.




PIAGM 2.3.1c n/a 124 secs


1G, 2G ?


Piologie_pi.zip 21 secs. 238 secs.




Pi4.exe 16 secs. 242 secs.




Ahppi.exe ? 292 secs.




Aptest.exe 35 secs. 432 secs.




Super_pi.exe 39 secs. 513 secs.



On 333 MHZ Pentium II under WindowsNT 4.0 for 131 072 decimals of Pi (certain programs are source, available below, I remind you...)

Program Author Formula
Calculation time
Pi AGM 2.3 Carey Bloodworth Formule Salamin 10 s
fftpi Takuyo Ooura Formule Salamin 11 s
Pi AGM 2.3 Carey Bloodworth Algo quartique
  of theBorwein
16 s
Ahppi Alan Pittman Formule Salamin 23 s
Aptest Mikko Tommila Algo quartique
  of the Borwein
32 s
Super Pi University of Tokyo Formule Salamin 33 s
Aptest Mikko Tommila Formule Salamin 33 s
GioPi Giovanni Ciampa Arctan 47.198 s
blokpi Jason Papadopoulos Serie Gosper 95.44 s
Pi Program Terj Mathisen Arctan 148.886 s
Pi Belard Fabrice Belard Arctan 165.25 s
Pi DPMI e Dario Alpern Arctan 182 s
Pi DPM Jan Kraak Formule Machin 196.74 s
pi_c50 Jason Papadopoulos Formule Arctan
334.12 s
WinPi Martin Mamo Formule Arctan
994 s
pi Roy Williams Formule Machin 1498.85 s
PiW Harry Smith Formule Arctan 1885.39 s
pi8 Carey Bloodworth Formule Machin 1935 s


Linux (pour Intel)

PiAGM - Carey Bloodworth
Author's Page - Download

Pixlinux - Jorg Arndt
Author's mail - Download
Based mainly on the algorithm of quadratic convergence by the Borwein, this program is relatively slow put more importantly configurable since there are no less than ten formulae offered. No source unfortunatly....

LinuxPi - Jorg Arndt
Author's mail - Download
This program is for WinPi on Linux, so it has all the advantage and disadvanteges mostly quite slow.

Linux (for Power PC)

PiAGM - Carey Bloodworth
Author's Page - Download

Linux (for Motorola 68k (old Macs !))

PiAGM - Carey Bloodworth
Author's Page - Download

Linux (for alpha and procesor>21064)

PiAGM - Carey Bloodworth
Author's Page - Download

Linux (for SuperSPARCS)

PiAGM - Carey Bloodworth
Author's Page - Download


HP UX, processeurs>64bit PA-RISC and HP UX 10

PiAGM - Carey Bloodworth
Author's Page - Download

IRIX, processeurs>64bit MIPS and IRIX 6.X

PiAGM - Carey Bloodworth
Author's Page - Download


SUN SOLARIS, UltraSPARCS and Solaris 2.x

PiAGM - Carey Bloodworth
Author's Page - Download


Procesors>Pentium with BeOSR4

PiAGM - Carey Bloodworth
Author's Page - Download (zip)

Procesors PowerPC with BeOSR4

PiAGM - Carey Bloodworth
Author's Page - Download (zip)


Pi - Juergen Bohl
Author's mail - Download


For Workbench >2.0.4 and procesors> 68020

PiCalc - Steffen Thorsen
Author's Page - Download

Script CGI

PiTrainer - Magnus Bodin
Author's Page - Download
A little program that test your knowledge of its decimals

Sources C

PiAGM - Carey Bloodworth
Author's Page - Download

Author's Page - Download - Explications
A quick program that uses a serie, the one by Gosper. Easy to understand it can goes up to 6 millions of decimals, but require a calculation time of n2.

Pidecimal.c - Fabrice Bellard
Author's Page - Download
Calculates the n-th digit of Pi without knowing the previous one by our favourite polytechnicien!

Pi.c - Roy Williams
Author's mail - Download
Uses the Machin formula and is well documented.

Pi3.c - Simon Plouffe
Author's mail - Download

Page de Rhoads
Author's Page - pibis.c - pibis3.c

Pi8.c - Carey Bloodworth
Author's Page - Download
Program using arctan formulae.

Pi_c50.c - Jason Papadopoulos
Author's Page - Download
Program using the formula by Klingenstierna (1730, see page of Machin)

Piclassic.c - Xavier Gourdon
Author's Page - Download
Simple program using Machin formula

PiHex - Colin Percival
Author's Page - Download
Calculates the hexadecimal digits Pi.

Pi20 - Kurt Van Branden
Author's mail - Download
Based on the serie by Ramanujan.

Pi9 - Kurt Van Branden
Author's mail - Download
Same Battle! Based on Ramanujan series. Just a little bit slower.

Pi3 - Kurt Van Branden
Author's mail - Download
Another one! Based on Machin series. And even slower.

Pi4 - Kurt Van Branden
Author's mail - Download
One last one? Based on the MAG. And still slower.

Pi10 - Kurt Van Branden
Author's mail - Download
Well no, yet one more... Based on the algorithm of the quadratic convergence of the Borwein. And as always slower.

Spigot Algorithm

Pi2bisc - Stan Rabinowitz
Original page - Download

Tiny Programmes (the shortest programs possible)

Tinypi - ?

Tiny - Dik T Winter
The famous program by Dik T Winter of cwi institute of Holland. Uses the same series of Euler as the spigot algorithm. 158 character for 2400 decimals!

Tiny2 - Sebastian Wedeniws
Even better, 142 characters, but I have not test the number of decimals that the programs get

Source Turbo-Pascal

CalcPi (zip)

Classes Java

Buf1.class - George Reese
Applet's page - Download
A simlation of throwing needles in the famous needle problem by Buffon.

Carlo.class - K. Kossert
Applet's page - Download
A simulation of throwing darts this time to estimate Pi using the Monté-Carlo method.

PiGenerator - Gus
Applet's page - Download
A simple generator, but quite useful.

Ramanujan.class - Gary Talkiewicz
Applet's page - Download
A nice interface, and with nice rapidity, but a bit limited unfortunatly.

Machin.class - John Bohr
Applet's page - Download
A linear display, and a practicle inteface for this program based on Machin formula.


PICAL - Jean-Christophe BENOIST
Program for HP-49 base on the spigot algorithm of Gorsper. Very small (256 octave), it gives 1000 decimals in 10 minutes. We enter the number of decimal required and start the program.

Mathematics library - FFT

FFT - Takuya OOURA
Author's Page - Download
It's a "package" to calculate with FFT, cos and sin of discrete sequence of numbers with a dimension and length 2^N.

Website Page - Download page
A site that specialise in FFT, is fftw.org, go and check it out. The majority of platforms have their own compiled version.

HFloat - Jorg Arndt
Website Page - Author's mail
Passionate to computer calculation, you will find on this page a mathematical library on the calcualtion of long reals.

APFloat - Mikko Tommila
Website Page - Author's mail
Libraries of fast multiplication, by the author of a program that calculates the decimals of Pi

CLN - Bruno Hable
Website Page - Author's mail
Libraries of fast multiplication also, by a french computer scientist, this time.

back to home page