# How to define double factorial for non positive integers?

I studied double factorial which known for natural number $$n!!=n(n-2)!! , 1!!=0!!=1$$ So we have for $$n\in N$$ $$(2n)!!=2^n n! , (2n+1)!!=\frac{(2n+1)!}{2^n n!}$$ but I found on Math-World formula for $$z\in C$$ $$z!!=2^{\frac{z}{2}} \Gamma\left(\frac{z}{2}+1 \right) \left(\frac{\pi}{2}\right)^{\frac{\cos(\pi z)-1}{4}}$$ I tried to find why it used this formula

I think we can write formula of double factorial for natural numbers by $$z!!=2^{\frac{z}{2}} \Gamma\left(\frac{z}{2}+1 \right) \left(\frac{\pi}{2}\right)^{\frac{1}{2}f(z)}$$ where $$f(z) = \begin{cases} 0 &\mathrm{if} \space z \space \mathrm{is\space even} \\ -1 & \mathrm{if} \space z \space \mathrm{is\space odd} \end{cases}$$ which mean $$f(z)=\frac{(-1)^z-1}{2}$$ but since $$(-1)^z=\cos(\pi z)$$ So I think it used that to define double factorial for non positive integers (which is correct for natural numbers).

but by the same way we can find that $$z!!=2^{\frac{z}{2}} \Gamma\left(\frac{z}{2}+1 \right) \frac{2^{-\frac{f(z)}{2}}}{\Gamma\left(1+\frac{f(z)}{2}\right)}$$ where $$f(z)$$ is $$0$$ if $$z$$ is even and is $$-1$$ if its odd which mean $$z!!=2^{\frac{z}{2}} \Gamma\left(\frac{z}{2}+1 \right) \frac{2^{\frac{1-\cos(\pi z)}{4}}}{\Gamma\left(\frac{\cos(\pi z)+3}{4}\right)}$$ the last formula is also correct for all natural numbers.

My Question is why math world chose that formula ?

is my reason is correct ? or there are another reason for choosing that formula?

• Commented 2 days ago
• Start by expressing the double factorials of integers via half-shift gamma functions.
– Gary
Commented 2 days ago
• @Gary does that explain that formula ? show your work please . Commented 2 days ago