Harman Patil (Editor)

Spouge's approximation

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

In mathematics, the Spouge's approximation is a formula for computing an approximation of the gamma function. It was named after John L. Spouge who defined the formula in a 1994 paper. The formula is a modification of Stirling's approximation, and has the form

Γ ( z + 1 ) = ( z + a ) z + 1 2 e z a ( c 0 + k = 1 a 1 c k z + k + ε a ( z ) )

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

c 0 = 2 π c k = ( 1 ) k 1 ( k 1 ) ! ( k + a ) k 1 2 e k + a k { 1 , 2 , , a 1 } .

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

a 1 2 ( 2 π ) 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. However, special care must be taken to use sufficient precision when computing the sum due to the large size of the coefficients ck, as well as their alternating sign. For example, for a = 49, one must compute the sum using about 65 decimal digits of precision in order to obtain the promised 40 decimal digits of accuracy.

References

Spouge's approximation Wikipedia