In general, the best methods for computing the gamma function are based on the evolution of Hankelâ€™s contour integrals. In this paper, two types of generic related methods are investigated to evaluate the gamma functions with geometric accuracy. Firstly, the application of the trapezoid rule on Talbot-type contours using optimal parameters derived by {\it J.A.C. Weideman} [SIAM J. Numer. Anal. 44, No. 6, 2342-2362 (2006;

Zbl 1131.65105)] for computing inverse Laplace transforms. Following {\it W. J. Cody}, {\it G. Meinardus} and {\it R. S. Varga} [J. Approximation Theory 2, 50--65 (1969;

Zbl 0187.11602)], the authors also investigate quadrature formulas derived from best approximation to $\exp(z)$ on the negative real axis. The two methods are closely related, and both converge geometrically. These are competitive with existing ones, even though they are based on generic tools rather than on specific analysis of the gamma function.
It is interesting that the second method is about twice as fast as the first, however, the first is simpler to implement as the construction of the best rational approximation is not trivial.