Spouge's approximation

From Wikipedia, the free encyclopedia

In mathematics, Spouge's approximation is a formula for the gamma function due to John L. Spouge. The formula is a modification of Stirling's approximation, and has the form

\Gamma(z+1) = (z+a)^{z+1/2} e^{-(z+a)} \left[ c_0 + \sum_{k=1}^{a-1} \frac{c_k}{z+k} + \epsilon_a(z) \right]

where a is an arbitrary positive integer and the coefficients are given by

c_0 = \sqrt{2 \pi}\,
c_k = \frac{(-1)^{k-1}}{(k-1)!} (-k+a)^{k-1/2} e^{-k+a} \quad k=1,2,\dots, a-1.

Spouge has proved that, if Re(z) > 0 and a > 2, the relative error is bounded by

\epsilon_a(z) \le a^{-1/2} (2 \pi)^{-(a+1/2)}.

The formula is similar to the Lanczos approximation, but has some distinct features. Whereas the Lanczos formula exhibits faster convergence, Spouge's coefficients are much easier to calculate and the error can be set arbitrarily low. The formula is therefore feasible for arbitrary-precision evaluation of the gamma function.

[edit] References

  • Spouge, John L. "Computation of the gamma, digamma, and trigamma functions", SIAM Journal on Numerical Analysis 31 (1994), no. 3, 931-944.

[edit] External links

In other languages