Published June 1, 1994
| Version v1
Journal article
Open
Computation of the Gamma, Digamma, and Trigamma Functions
Creators
Description
This paper gives an approximation for the gamma function that, while different, has the same form as one by Lanczos [SIAM J. Numer. Anal., B1 (1964), pp. 86–96]. Both approximations correct Stirling's approximation with contributions from the gamma function's poles, and both require time independent of z to calculate with a relative error . At comparable accuracies, this paper's approximation requires slightly more computation than Lanczos' but is clearly superior in two ways; its coefficients are given by simple formulas and the error estimates apply not only to the gamma function, but also to its derivatives. Thus approximations for the digamma and trigamma functions are also given. Let and , with z complex and a real. Several lemmas in the paper require "Stirling inequalities," i.e., bounds on . To this end, the classical Binet integral for is generalized from to all real a. Since the generalized Binet integral is a Laplace transform, the requisite Stirling inequalities follow from the complete monotonicity of such transforms. The proof of the main theorem uses the calculus of residues and presents a lemma generalizing Plana's theorem, which, like the Euler–Maclaurin sum formula, evaluates the difference between a sum and the corresponding integral. This paper also presents a factorial approximation that is both simpler and more accurate than Stirling's approximation.
Files
article.pdf
Files
(1.5 MB)
Name | Size | Download all |
---|---|---|
md5:f2ab99170f51bcc02d182dd116377c1a
|
1.5 MB | Preview Download |