Gamma Function Using Spouge's Method

08222015, 02:09 AM
Post: #14




RE: Gamma Function Using Spouge's Methjod
(08212015 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.2e10 for n = 5 and 2.7e12 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, nothat'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 Nov64 with this stuff (if possible). Les 

« Next Oldest  Next Newest »

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