This is for instance useful in connection with the limit distributions of tests for cointegration rank. Those distributions are non-standard, but approximated rather well by Gamma distributions, see Nielsen (Biometrika 1997) and Doornik (Journal of Economic Surveys 1998). Doornik (1998) gives response surfaces for mean and variance of the cointegration distributions for a wide range of cointegration tests.
The numerical routine is based on various different approximations dependent on the value of parameters: The Wilson-Hilferty approximation (Johnson, Kotz, Balakrishnan: Continuous univariate distributions vol. 1, 2nd ed. 1994, p. 426), the continued fraction expansion, the asymptotic expansion, and the series development (Abramowitz and Stegun Handbook of mathematical functions Dover, 1965, p. 262). Further documentation is given in the Turbo pascal source code which is freely available.