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!

Try Nemes' approximation:
$$\ln ( \Gamma( x ) ) = \frac12 \ln( 2 \pi ) + \left( x - \frac12 \right) \ln( x ) - x + \frac x2  
                       \ln\left( x \sinh\left( \frac1x \right) + \frac 1 {810 x^6} \right) $$
The last term, $\dfrac1 { 810 x^6}$ is an error-checking term and may be eliminated from your calculations.
Here is my reference.
