About memory-usage of mpz_mul

Akira Wada a-wada at mars.dti.ne.jp
Wed Jun 22 08:17:48 UTC 2016


Dear Sir.

 I tried to compute 1,000,000,000 digits of PI with S.Lyster's 2terms arctan_formula i.e.

 PI/4 = 22 * arctan (1/28) + arctan (1744507482180328366854565127/98646395734210062276153190241239)

using my program to compute PI using ARCTAN formuae. It taked time about 2 hours 53 minuts, but

for 100,000,000 digits only 15 minuts. At last stage of the binary-splitting, mpz_mul (a, b, c) is called

i.e.  a = b * c  here length of a : 2.9 GB, b : 1.6 GB , c : 1.3 GB and my PC has 7.8 GB RAM available,

and the other large DATA is written out to FILEs. Looking by the system-moniteor, for over 2 hours,

" max 23.7 GB of swap-area is in work, and all CPU-usage is holded under 5 % "   WHY ???


Thanks advance.

  Regard,   A.Wada

PS. Using GMP version is 6.1.0


More information about the gmp-discuss mailing list