Ellipse circumference by pooq

r=io.read while""do a=r"*n"b=r()i=1.5708 f=0 for u=2,1e4,2 do f=i+f i=i*(u-4+3/u)/u*(1-(b/a)^2)end w=f*a*4+.5 print(w-w%1)end

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

download

return to the top page