Computing the Gamma Function Using Contour Integrals and Rational Approximations

  • Authors:
  • Thomas Schmelzer;Lloyd N. Trefethen

  • Affiliations:
  • -;-

  • Venue:
  • SIAM Journal on Numerical Analysis
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

Some of the best methods for computing the gamma function are based on numerical evaluation of Hankel’s contour integral. For example, Temme evaluates this integral based on steepest descent contours by the trapezoid rule. Here we investigate a different approach to the integral: the application of the trapezoid rule on Talbot-type contours using optimal parameters recently derived by Weideman for computing inverse Laplace transforms. Relatedly, we also investigate quadrature formulas derived from best approximations to $\exp(z)$ on the negative real axis, following Cody, Meinardus, and Varga. The two methods are closely related, and both converge geometrically. We find that the new methods are competitive with existing ones, even though they are based on generic tools rather than on specific analysis of the gamma function.