I find the following code for perimeter (or circumference of ellipse):
12*Integral(sqrt((-8*_x**2/9 + 1)/(-_x**2 + 1)), (_x, 0, 1))
This means the calculation depends on numerical integration which is very time consuming.
I am attaching a file containing Python sympy code to calculate numerical value of perimeter of ellipse to hundreds of decimal places. It computes value of
perimeter of Ellipse for 800 decimals in less than 1 second on my computer.
Please incorporate in sympy after necessary modification if you find it suitable.
Regards
Panna Lal Patodia