Ellipse circumference by idealmachine

for(;[a,b]=readline(h=1.5708).split(' ');print(4*a*f+.5|0))for(c=1,f=0,u=2;u<=99*a/b;u+=2)f+=c*h,h*=1-1/u,c*=(u-3)/u*(1-b*b/a/a)\x0d

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

download

return to the top page