This is great, thank you. I couldn't find Lanczos in your paper. There is a good thesis on his method, which also had a good tutorial on the Gamma function, including Stirling and Spouge, at [1]. I also didn't see concrete algorithms pseudo-code or real source code. There is source code for Lanczos at [2]. It is very compact and the web page explains how he determined the right coefficients and parameters. He evaluated Gamma[102] to 165 digit precision as an example. There is also source code for PARI's version of gamma (with some variable, function, etc. names in French) at [3] in the file "src/basemath/trans2.c", functions mpgamma and mplngamma. Newer versions of PARI seem to have renamed it or moved it to another file, and I haven't bothered to track down the details. - Robert [1] http://laplace.phas.ubc.ca/ThesesOthers/Phd/pugh.pdf [2] http://www.vttoth.com/CMS/projects/41-the-lanczos-approximation [3] http://pari.sourcearchive.com/documentation/2.1.6/files.html On Fri, Dec 30, 2011 at 12:39, Warren Smith <warren.wds@gmail.com> wrote:
many formulas about gamma function are in my paper: http://rangevoting.org/WarrenSmithPages/homepage/gammprox.pdf
-- Robert Munafo -- mrob.com Follow me at: gplus.to/mrob - fb.com/mrob27 - twitter.com/mrob_27 - mrob27.wordpress.com - youtube.com/user/mrob143 - rilybot.blogspot.com