Algorithm to compute Gamma function The question is simple. I would like to implement the Gamma function in my calculator written in C; however, I have not been able to find an easy way to programmatically compute an approximation to arbitrary precision.
Is there a good algorithm to compute approximations of the Gamma function?
Thanks!

Someone asked a similar question yesterday. I thought of replacing $e^{-t}$ by a series.
$$\Gamma (z) = \int_{0}^{\infty} t^{z-1} e^{-t} dt \approx \sum_{j=0}^{a} \frac{(-1)^j b^{j+z}}{(j + z) j !} . \text{Choose } a > b ,$$ but as J. M. points out, I should have checked this a bit better. Take great care in the choice of $a, b$.
