|
![](/i/fill.gif) |
"the_ajj" <nomail@nomail> wrote:
> "PM 2Ring" <nomail@nomail> wrote:
> > If you like, I can translate a short Pi generator into POV SDL that will
> > give about 700 digits before it gets overflow errors. On a related note, I
> > posted a POV scene file a few months back that can calculate e to millions
> > of digits. I'll repost it if you like.
> Pi generator would be cool! Could generate some very nice abstract images
> then! Be great if you could post it.
(I thought I replied to this bit already, but I can't see my reply anywhere.
Oh well...)
I'll work on converting Dik T. Winter's Pi program into POV SDL this
weekend. It shouldn't take too long - I'll just modify my e calculator.
Here's Dik's C source for this algorithm, which can actually do a little
over 800 digits.
int a=10000,b,c=2800,d,e,f[2801],g;main(){for(;b-c;)f[b++]=a/5;
for(;d=0,g=c*2;c-=14,printf("%.4d",e+d/a),e=d%a)for(b=c;d+=f[b]*a,
f[b]=d%--g,d/=g--,--b;d*=b);}
Do a Google Groups search on
Dik T. Winter Pi digits
for more info.
Post a reply to this message
|
![](/i/fill.gif) |