On Tue, Feb 25, 2003 at 11:30:01AM +0100, Mirar @ Pike developers forum wrote:
You don't happen to have a Pi-generating algorithm around? :)
there is a website where you can download a few megabytes worth of digits. though atm i am more interrested in an algorithm to generate prime numbers actually... (but thats another topic)
Gmp.mpf("3.1415926",32*256,10);
ahh, a string. and i just noticed this: Gmp.mpf(Gmp.mpq(31415926,10000000)); also works.
thanks.
sprintf %f and cast to string is broken for mpf, so I guess you'll have to do something else (cast to float?).
wait for the bug to get fixed ;-) considering that mpf is just a subset of mpq the latter will do fine