# How to calculate the double factorial in SageMath?

I would like to implement the square root of 2 power series:

$ \sqrt{2} = -\sum \limits_{n=0}^{\infty}{\frac{(-1)^n (2n-3)!!}{2^n \times n!}} $

(which I obtained from the Maclaurin series of $\sqrt{1+x}$ with $x=1$) in SageMath but I cannot seem to find the double factorial function in the SageMath docs. Is there one? I suppose if a double factorial function is not available I could use this method of finding the double factorial that I found on Wolfram MathWorld:

$\Gamma(n+\frac{1}{2}) = \frac{(2n-1)!!}{2^n}\sqrt{\pi}$

In my opinion the series is slowly converging to the limit, for instance:

The Taylor polynomial contains the needed coefficients. However even after $400$ terms we get relatively big numbers to add, subtract, add...

Ya I'm well aware convergence is an issue. This method with N (number of terms) = 10,000 is only accurate to 6 decimal places. I know a far more convergent method of estimating $\sqrt{2}$ is Newton's method. Just wanted to give this a try.