Ellipse circumference by nn

System.in.eachLine{{a,b->c=a+b
v=1
printf'%.0f\n',3.1416*(0..13).sum{s=v*v*c;v*=(a-b)/c*(it-0.5)/~it;s}}it.split()*.toLong()}

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

download

return to the top page