Gamma Function Using Spouge's Method
08-25-2015, 06:48 PM (This post was last modified: 08-25-2015 09:43 PM by Dieter.)
Post: #28
 Dieter Senior Member Posts: 2,397 Joined: Dec 2013
RE: Gamma Function Using Spouge's Methjod
(08-25-2015 01:56 AM)lcwright1964 Wrote:  With these Lanczos approximations, the series is in 1/z, 1/z+1, 1/z+2, etc., rather than just constant, z, z^2, z^3, etc. This is where Viktor Toth's rearrangement comes into play, to give

(z!/stuff in front)*Product(z+i, i=0..n) ~= polynomial in z of degree n

as the original approximation to be maximized.

All I know is that Mathematica and Maple (and most probably also others) offer some tools for rational and other approximations. But I do not have access to such software so I cannot say more about this.

However...

(08-25-2015 01:56 AM)lcwright1964 Wrote:  Or I could just stay with the original form, as you have, and fiddle with things in a spread sheet

...this approach has its special advantages. You can taylor an approximation exactly to meet your specific needs. For instance you may want to have better accuracy over a certain interval while for the rest a somewhat less accurate result will do. Or you may define a different error measure, for instance a max. number of ULPs the approximation can be off. That's what I like about the manual approach.