Post Reply 
Gamma Function Using Spouge's Method
08-23-2015, 09:01 PM
Post: #21
RE: Gamma Function Using Spouge's Methjod
(08-22-2015 11:51 PM)lcwright1964 Wrote:  Getting back to the original topic, I have used that very same Maple worksheet and Pugh's recommendations to give this n = 4 (i.e. 5 coefficient) version for a 10-digit FOCAL environment:

(0.3264892413e-1 + 1.188688981/z - 1.068410309/(z+1) + .1887119902/(z+2) - 0.2745021709e-2/(z+3)) * ((z+ 3.840881909)/exp(1))^(z-1/2)

In an ideal situation (i.e., a couple of guard digits kicking around) this is supposed to give between 9.5 and 11 edd in the z = 0 to 70 range

I admit I do not have the means nor the mathematical skills to determine a set of coefficients optimized for the domain z = 0...70 or 71, but I tried a simplified approach in that I assumed the last coefficient 3,840881909 to be "exact". ;-)

This way a simple linear equation system can be used to get an optimized set of constants for the desired range, and indeed the results are similar to what you posted. The optimized coefficients now yield a max. relative error within ±4 E–11. Which translates to "10,3 edd" or better. Compared to the original data set this means almost one more valid digit.

However, this accuracy level requires constants with more than 10 significant digits. With coefficients rounded to 10 digits a relative error within ±7 E–11 is possible. As you already mentioned, on a 10-digit calculator like the '41 or '67 of course the effective accuracy is less since the whole calculation is done with merely 10 digits.

Now maybe you or someone else may setup a "really" optimized approximation including the final 3,84... coefficient. ;-)

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-23-2015 09:01 PM



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