In case it isn't obvious I'm pretty sure the table of values used in the implementation in Ultra Fractal that I posted is from the Lanczos approximation, which at one point I was meaning to implement myself to get the table but that was before I found the one that I used (which saved a lot of time). I would have posted the links to all the relevant sources I used but I've moved 3 computers on since then and the old Windows PC with the links on is now in storage ;) On 31 Dec 2011, at 03:06, Robert Munafo wrote:
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 _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun