Gamma Function Using Spouge's Method
|
08-20-2015, 12:36 PM
Post: #10
|
|||
|
|||
RE: Gamma Function Using Spouge's Methjod
(08-19-2015 05:32 PM)lcwright1964 Wrote: I think I was once drawn to this pseudocode (edited by me to include Luschny's suggested simplification in the formula) which implements the Stieltjes continued fraction: As far as I can see the last x<7 test can be omitted. I tried this in VBA for Excel: Code: Function Gamma(x) The constant in the last line is sqrt(2*pi). It turned out that the results seem to have not just eight but 10 valid digits, at least when evaluated with 15-digit precision. Only in some close cases I noticed that the 10th digit may be rounded down instead of up (e.g. for x=1,7 or 7,8). I'll try this one on my '41. ;-) Thank you very much for reminding me of Peter Luschny's excellent Gamma/factorial pages. Dieter |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)