Post Reply 
Gamma Function Using Spouge's Method
08-20-2015, 07:49 PM (This post was last modified: 08-20-2015 07:57 PM by lcwright1964.)
Post: #11
RE: Gamma Function Using Spouge's Methjod
(08-19-2015 08:56 PM)Ángel Martin Wrote:  Yes I used 13-digit routines for the MCODE version in the SandMath, which uses the Lanczos formula

May I ask which coefficients? Lanczos offers some in his original paper, and I believe that rendering is quoted in Numerical Recipes verbatim. But there is also the unpublished work of Paul Godfrey, discussed by Viktor Toth on his old website, that reports a matrix algebra method of generating the Lanczos formula coefficients. I think I observed years ago that Godfrey's reported errors in a Matlab implementation were somewhat overly optimistic, as he only seemed to test his formulae with integral and half-integral arguments.

Finally, I think anyone serious about the Lanczos approximation really needs to look at the PhD dissertation of Glen Pugh. Most of the theory and proofs are beyond me, BUT Professor Pugh did some extensive arbitrary precision computer algebra experiments and concluded that the selection of parameters as presented in the original Lanczos paper isn't the best way to go about things, and it is possible to get much less relative error than that originally reported with the same number of terms. For programmers with a mastery of elementary algebra, that part of his work is completely accessible. The Pugh thesis is freely available in a few places--simply Google something like "Pugh Lanczos Dissertation pdf" and you will find it. Dr. Pugh was also receptive to inquiries--he was very friendly with me when I wrote.

Hope this is of interest.


EDIT: Top Google hit for my search:

Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
RE: Gamma Function Using Spouge's Methjod - lcwright1964 - 08-20-2015 07:49 PM

User(s) browsing this thread: 1 Guest(s)