Jump to content

Spouge's approximation

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 66.109.50.178 (talk) at 17:48, 10 May 2016 (Converted the opening compound sentence into two simple declarative sentences.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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

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

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

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 , as well as their alternating sign. For example, for a=49, you must compute the sum using about 65 decimal digits of precision in order to obtain the promised 40 decimal digits of accuracy.

See also

References

  1. ^ Spouge, John L. (1994). "Computation of the Gamma, Digamma, and Trigamma Functions". SIAM Journal on Numerical Analysis. 31 (3): 931–000. doi:10.1137/0731050. JSTOR 2158038.