Post Reply 
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
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 Smile

...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.

Addendum:

Les, you wanted an approxmation for n=5. I did some calculations on Free42 with 34-digit BCD precision. The exact coefficients are not fixed yet, but with c=5.081 it looks like the relative error for x=0...70 is about ±4 E–13.

Dieter
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 - Dieter - 08-25-2015 06:48 PM



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