Calculated pi with 487 billion digits by diskized GMP

Torbjörn Granlund tg at gmplib.org
Fri Sep 1 09:12:38 CEST 2023


cents2823 at yahoo.co.jp writes:

  I am making a program to calculate pi with gmp and Chudnovsky Algorithm. 

  If the number of digits to calculate pi increases,
  it takes using swap and takes a lot of time(*1) to calculate.

  So I diskized(*2) some functions of gmp and calculated pi 487 billion digits.
  It took about 10 days to calculate.

  I also calculated pi with y-cruncher and checked the result of a match.

  On the same PC, y-cruncher can calculate 1 trillion digits of pi in 32 hours. 

  Why so fast!

Or, put differently, why is GMP slow for truly huge operands?

The answer is that we haven't written great multiplication code for the
largest operands.  We made some work in that area some years ago, but it
never made it into GMP.

Special purpose Pi calculation programs are tailor made for huge
operands, of course.

-- 
Torbjörn
Please encrypt, key id 0xC8601622


More information about the gmp-discuss mailing list