Variable size/Set: Difference between revisions
m
forgot the "3."
m (forgot the "3.") |
|||
Line 405:
<lang Phix>include mpfr.e -- requires 0.8.0+
string nines = repeat('9',1001) -- +1 for the "3."
mpz ndp = mpz_init(nines) -- mpz_init(nines,
integer precision = mpz_sizeinbase(ndp,2) --
mpfr pi = mpfr_init(0,precision) -- or just hard-code that
mpfr_const_pi(pi)
mpfr_printf(1,"PI with 1000 decimals: %.1000RDf\n\n",pi)</lang>
|