Post Reply 
Gamma Function Using Spouge's Method
08-22-2015, 02:09 AM
Post: #14
RE: Gamma Function Using Spouge's Methjod
(08-21-2015 09:48 AM)Ángel Martin Wrote:  Indeed it was the formula with the coefficients published on Viktor's page.

Do you mean the seven q's and the formula rearranged for calculators?

If that is the case, you might want to know that the selection of the free parameter (Viktor calls it g, but it is a elsewhere) is from the original Lanczos paper and is quite arbitrary. One very practical result of Pugh's work is that there is an optimal value of this free parameter for each number of terms one takes in the series (n or n + 1, depending how you index). Indeed, Pugh published the list as an appendix to his thesis. The optimal value for n = 5 is about 5.58 and is about 6.78 for n = 6. He reports a max relative error of 1.2e-10 for n = 5 and 2.7e-12 for n = 6, for 9.9 and 11.6 edd (exact decimal digits) respectively. Keep in mind that these errors cover complex arguments as well, and the performance for eligible real values tends to be somewhat better.

I can swear that I did up a Maple worksheet of this ages ago, that accepted these optimal parameters as input, solved Godfrey's matrix equations for the associated coefficients, doing it all to very generous arbitrary precision, and transformed them into the form recommended by Victor for calculator programming. But can I find the darn thing? Alas, no--that's a couple of hard drives ago.

If I do redo this I can compute and send you "improved" coefficients, in the event you ever tweak the code. It might not make much difference unless you can shorten your series by a term, but I sure would like to ponder the question.

I want to continue this discussion elsewhere in the forum as I have some broader newbie questions about the newest SandMath, Lib#4, and programming Nov-64 with this stuff (if possible).

Les
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-22-2015 02:09 AM



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