How do you use 'Pi' and 'e' with GMP?

Chris Shreve c.k.shreve at
Wed Mar 1 21:53:27 UTC 2017


I've just started using GMP (and have looked through at least half the
archives) and
was wondering: how do you use Pi and e in GMP.  Are pi and e defined as
constants somewhere?  Or are there functions that return these values to an
arbitrary precision?

For example how would I represent/printout the first 1000 digits of
pi^(2*e).  Moreover,
how would I store and use it?  I assume mpf_t?

Much thanks for any info on this.


More information about the gmp-discuss mailing list