Spouge's approximation
In mathematics, Spouge's approximation is a formula for the gamma function due to John L. Spouge in 1994.[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
<templatestyles src="Reflist/styles.css" />
Cite error: Invalid <references>
tag; parameter "group" is allowed only.
<references />
, or <references group="..." />
External links
- Gamma function with Spouge's formula - Mathematica implementation at LiteratePrograms
<templatestyles src="Asbox/styles.css"></templatestyles>
- ↑ Lua error in package.lua at line 80: module 'strict' not found.