The Golden Ratio by 51b

x=1e4,s[126],t[126],r,*p,*q;main(i){for(*t=2*(*s=500);i<999;i++)for(r=0,p=t,q=s;p<t+126;q[-1]+=(*q+=*p/=8*i)<0?*q+=x,-1:*q/x,*q++%=x,p[-1]+=*p/x,*p++%=x)r=(*p=*p*(3-2*i)+r*x)%(8*i);for(i=0;i<125;)printf(i++?"%04d":"1.%d",s[i]);}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page