Site hosted by Angelfire.com: Build your free website today!

PI

Yes, I AM a geek, and here is a short thing on PI.

Well, you have probably already learned a lot about PI if you have ever done anything with math. Well, I have a new toy: First, I found 160 characters of c code that display the first 800 digits of pi, minus the decimal point, so sue me.

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);}

The main problem being, they left out a "#include stdio.h", but that's ok. If you don't have a c compiler, or trust me and don't feel like typing it all yourself, you can Download the Executable. That is all for now.

Email: tsm9@email.byu.edu