Home Blog Howto Photos Podcasts Contact About

Have a piece of Pi

Published on 2005-03-18 by Mark VandeWettering

a[52514],b,c=52514,d,e,f=1e4,g,h;main(){for(;b=c-=14;h=printf("%04d",
e+d/f))for(e=d%=f;g=--b*2;d/=g)d=d*b+f*(h?a[b]:f/5),a[b]=d%--g;}

Try reading this interesting paper to learn more.

Source code, since WordPress insists on doing something to the quotes in the code above.

© 2025 Mark VandeWettering

Last updated May 14, 2025

Based upon Sunaina Pai's excellent makesite.py script

Resume