# [gambit-list] Computing a billion decimal digits of pi

Wed Jul 10 11:47:48 EDT 2013

```On 06/12/2013 01:07 PM, Bradley Lucier wrote:
>
> Just for laughs and giggles, I decided to calculate 1,000,000,000
> (yes, 9 zeros) digits of pi using Bakul Shah's Scheme program
> implementing the Chudnovsky algorithm.  The computation used one CPU
> core:
>
> model name    : Intel(R) Xeon(R) CPU           X5570  @ 2.93GHz
>
> with a pretty good memory subsystem with 72GB of memory ...
>
> leibniz-172% gsi chud2
> Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits
> 10, CPU time: 0..
> Last 5 digits 26535.
> Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits
> 100, CPU time: 0..
> Last 5 digits 70679.
> Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits
> 1000, CPU time: 0..
> Last 5 digits 1989.
> Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits
> 10000, CPU time: .020000000000000004.
> Last 5 digits 75678.
> Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits
> 100000, CPU time: .340022.
> Last 5 digits 24646.
> Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits
> 1000000, CPU time: 5.140321.
> Last 5 digits 58151.
> Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits
> 10000000, CPU time: 83.765235.
> Last 5 digits 55897.
> Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits
> 100000000, CPU time: 1327.790981.
> Last 5 digits 51592.
> Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits
> 1000000000, CPU time: 41907.731069.
> Last 5 digits 45519.
>

This is the same program, run on my new desktop:

model name    : Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz

with 16GB of RAM, which seems to run 2-3 times as fast as the server in
the math department.  (Luckily, a new server will be up and running soon.)

firefly:~/programs/gambiteer> gsi chud2
Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits
10, CPU time: 0..
Last 5 digits 26535.
Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits
100, CPU time: 0..
Last 5 digits 70679.
Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits
1000, CPU time: 0..
Last 5 digits 1989.
Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits
10000, CPU time: .012.
Last 5 digits 75678.
Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits
100000, CPU time: .172.
Last 5 digits 24646.
Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits
1000000, CPU time: 2.476.
Last 5 digits 58151.
Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits
10000000, CPU time: 38.7.
Last 5 digits 55897.
Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits
100000000, CPU time: 536.864.
Last 5 digits 51592.
Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits
1000000000, CPU time: 14459.672.
Last 5 digits 45519.

```