a,b,c,d=2,5,3,7;n=5 while n<4e3:r=(a+c<<n)//(b+d);x=r&1;a+=c*x;b+=d*x;c-=a*~-x;d-=b*~-x;n+=1 print("0.%d"%(r*10**1000>>3999))
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page