Post Reply 
F distribution on the 41C
12-22-2015, 07:00 AM (This post was last modified: 12-22-2015 07:01 AM by Dieter.)
Post: #35
RE: F distribution on the 41C
(12-22-2015 05:54 AM)Namir Wrote:  I found a lot of interesting function in Numerical Recipes (3rd ed) in the chapter that discusses the Beta, incomplete Gamma, and so on. I was surprised to experiment with the book's implementation of function Gammaln and see that exp(Gammaln(x)) gives good results for Gamma(x) even small values of x. Until now, I had the impression that Gammaln was good only for large values of x.

The NR version I read calculates Gamma with an approximation which is good for about 10 digits (if evaluated in double precision). Of course lnGamma often is the only way to handle large arguments. In statistics we often deal with quotients of Gamma values, or more generally with quotients of very large numbers where the result is of perfectly "normal" order. Here using logs is very useful.

The accuracy limits of a lnGamma function show up at large results: even if lnGamma is exact to, say, 16 significant digits and the integer part has four digits, ±1 ULP of potential error equals ±1 E–12. Which in turn means that Gamma = exp(lnGamma) may have a relative error of 1 E–12, so we get no more than 12 digits accuracy for Gamma itself. On the other hand at least there is no overflow error. ;-)

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
F distribution on the 41C - quantalume - 12-16-2015, 05:02 PM
RE: F distribution on the 41C - Dieter - 12-16-2015, 06:05 PM
RE: F distribution on the 41C - quantalume - 12-16-2015, 07:55 PM
RE: F distribution on the 41C - Dieter - 12-16-2015, 08:22 PM
RE: F distribution on the 41C - quantalume - 12-16-2015, 09:03 PM
RE: F distribution on the 41C - Dieter - 12-16-2015, 09:08 PM
RE: F distribution on the 41C - Namir - 12-17-2015, 12:52 AM
RE: F distribution on the 41C - quantalume - 12-17-2015, 03:31 PM
RE: F distribution on the 41C - Dieter - 12-18-2015, 10:25 PM
RE: F distribution on the 41C - Namir - 12-19-2015, 02:37 PM
RE: F distribution on the 41C - Dieter - 12-20-2015, 05:02 PM
RE: F distribution on the 41C - Namir - 12-20-2015, 11:15 PM
RE: F distribution on the 41C - Dieter - 12-21-2015, 07:24 PM
RE: F distribution on the 41C - Namir - 12-21-2015, 09:52 PM
RE: F distribution on the 41C - Dieter - 12-25-2015, 02:54 PM
RE: F distribution on the 41C - quantalume - 12-17-2015, 03:36 PM
RE: F distribution on the 41C - Dieter - 12-17-2015, 07:37 PM
RE: F distribution on the 41C - Dieter - 12-17-2015, 09:32 PM
RE: F distribution on the 41C - quantalume - 12-17-2015, 10:35 PM
RE: F distribution on the 41C - Dieter - 12-17-2015, 10:53 PM
RE: F distribution on the 41C - quantalume - 12-17-2015, 11:05 PM
RE: F distribution on the 41C - Dieter - 12-18-2015, 08:38 PM
RE: F distribution on the 41C - quantalume - 12-18-2015, 11:26 PM
RE: F distribution on the 41C - rprosperi - 12-19-2015, 01:39 AM
RE: F distribution on the 41C - Dieter - 12-19-2015, 09:00 AM
RE: F distribution on the 41C - Dieter - 12-19-2015, 09:18 AM
RE: F distribution on the 41C - quantalume - 12-19-2015, 06:22 PM
RE: F distribution on the 41C - Dieter - 12-19-2015, 09:16 PM
RE: F distribution on the 41C - quantalume - 12-20-2015, 12:28 AM
RE: F distribution on the 41C - Dieter - 12-20-2015, 01:17 PM
RE: F distribution on the 41C - Gene - 12-26-2015, 03:38 PM
RE: F distribution on the 41C - Dieter - 12-26-2015, 04:56 PM
RE: F distribution on the 41C - Gene - 12-26-2015, 06:04 PM
RE: F distribution on the 41C - Namir - 12-22-2015, 05:54 AM
RE: F distribution on the 41C - Dieter - 12-22-2015 07:00 AM
RE: F distribution on the 41C - Paul Dale - 12-22-2015, 07:30 AM
RE: F distribution on the 41C - Dieter - 12-22-2015, 07:50 PM
RE: F distribution on the 41C - Paul Dale - 12-22-2015, 09:34 PM
RE: F distribution on the 41C - Dieter - 12-26-2015, 10:09 PM
RE: F distribution on the 41C - Namir - 12-26-2015, 03:03 PM
RE: F distribution on the 41C - Dieter - 12-26-2015, 05:19 PM
RE: F distribution on the 41C - Gene - 12-30-2015, 05:54 PM



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