Million digits of Pi

paul zimmermann Paul.Zimmermann at
Sat Nov 9 10:44:55 UTC 2019

> > Where can I find source code of fast formula computing Pi using GMP?
> > How to ensure that all digits are correct?

you can use the tconst_pi program from MPFR: tconst_pi prec computes Pi with
correct rouding (to nearest) and precision of prec bits, then prints that
binary value in decimal with correct rouding again.

However you will soon hit GMP limitations, which cannot compute with huge

Best regards,
Paul Zimmermann

More information about the gmp-discuss mailing list