Difference between revisions of "LGamma"
m (underflow, not overflow...) |
|||
Line 9: | Line 9: | ||
To compute <code>[[Ln]]([[BetaFn]](a,b))</code>, you should instead use | To compute <code>[[Ln]]([[BetaFn]](a,b))</code>, you should instead use | ||
:<code>[[LGamma]](a) + [[LGamma]](b) - LGamma(a+b)</code> | :<code>[[LGamma]](a) + [[LGamma]](b) - LGamma(a+b)</code> | ||
− | which is less susceptible to numeric | + | which is less susceptible to numeric underflow for really large values of <code>a</code> and <code>b</code>. |
== See Also == | == See Also == |
Revision as of 21:24, 5 February 2016
LGamma(X)
Returns the Log Gamma function of «X». Without numeric overflow, this function is exactly equivalent to Ln(GammaFn(X))
.
Because the gamma function grows so rapidly, it is often much more convenient to use LGamma() to avoid numeric overflow.
LogBetaFn(x)
To compute Ln(BetaFn(a,b))
, you should instead use
which is less susceptible to numeric underflow for really large values of a
and b
.
See Also
Comments
Enable comment auto-refresher