HOME

TheInfoList



OR:

In mathematics, Spouge's approximation is a formula for computing an approximation of the
gamma function In mathematics, the gamma function (represented by , the capital letter gamma from the Greek alphabet) is one commonly used extension of the factorial function to complex numbers. The gamma function is defined for all complex numbers except th ...
. It was named after John L. Spouge, who defined the formula in a 1994 paper. The formula is a modification of
Stirling's approximation In mathematics, Stirling's approximation (or Stirling's formula) is an approximation for factorials. It is a good approximation, leading to accurate results even for small values of n. It is named after James Stirling, though a related but less p ...
, and has the form :\Gamma(z+1) = (z+a)^ e^ \left( c_0 + \sum_^ \frac + \varepsilon_a(z) \right) where ''a'' is an arbitrary positive integer and the coefficients are given by :\begin c_0 &= \sqrt\\ c_k &= \frac (-k+a)^ e^ \qquad k\in\. \end Spouge has proved that, if Re(''z'') > 0 and ''a'' > 2, the relative error in discarding ''ε''''a''(''z'') is bounded by :a^ (2 \pi)^. 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 In computer science, arbitrary-precision arithmetic, also called bignum arithmetic, multiple-precision arithmetic, or sometimes infinite-precision arithmetic, indicates that calculations are performed on numbers whose digits of precision are li ...
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.


See also

*
Stirling's approximation In mathematics, Stirling's approximation (or Stirling's formula) is an approximation for factorials. It is a good approximation, leading to accurate results even for small values of n. It is named after James Stirling, though a related but less p ...
* Lanczos approximation


References

{{reflist Gamma and related functions Computer arithmetic algorithms