Talk:Gamma function with Spouge's formula (Mathematica)

From LiteratePrograms
Jump to: navigation, search

The Mathematica version is amazingly compact, but this should be really easy to implement in any programming language. I'll do a Python version, but first I need to finish decent high-precision versions of exp, log, pow and sin (which are all annoyingly difficult to do right).

To do: optimize for speed by calculating the coefficients numerically instead of storing the symbolic representations. This will perhaps require some thought since there are rounding and cancellation errors involved. Mathematica easily exceeds its default MaxExtraPrecision limit when doing it automatically for high precision levels. Fredrik 15:00, 25 July 2006 (PDT)

hijacker
hijacker
hijacker
hijacker