pal.math

## Class GammaFunction

• ```public class GammaFunction
extends Object```
gamma function
Version:
\$Id: GammaFunction.java,v 1.1 2006/06/01 15:27:32 gene099 Exp \$
Author:
Korbinian Strimmer
• ### Constructor Summary

Constructors
Constructor and Description
`GammaFunction()`
• ### Method Summary

All Methods
Modifier and Type Method and Description
`static double` ```incompleteGammaP(double a, double x)```
Incomplete Gamma function P(a,x) = 1-Q(a,x) (a cleanroom implementation of Numerical Recipes gammp(a,x); in Mathematica this function is 1-GammaRegularized)
`static double` ```incompleteGammaP(double a, double x, double lnGammaA)```
Incomplete Gamma function P(a,x) = 1-Q(a,x) (a cleanroom implementation of Numerical Recipes gammp(a,x); in Mathematica this function is 1-GammaRegularized)
`static double` ```incompleteGammaQ(double a, double x)```
Incomplete Gamma function Q(a,x) (a cleanroom implementation of Numerical Recipes gammq(a,x); in Mathematica this function is called GammaRegularized)
`static double` `lnGamma(double alpha)`
log Gamma function: ln(gamma(alpha)) for alpha>0, accurate to 10 decimal places
• ### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• ### Constructor Detail

• #### GammaFunction

`public GammaFunction()`
• ### Method Detail

• #### lnGamma

`public static double lnGamma(double alpha)`
log Gamma function: ln(gamma(alpha)) for alpha>0, accurate to 10 decimal places
Parameters:
`alpha` - argument
• #### incompleteGammaQ

```public static double incompleteGammaQ(double a,
double x)```
Incomplete Gamma function Q(a,x) (a cleanroom implementation of Numerical Recipes gammq(a,x); in Mathematica this function is called GammaRegularized)
Parameters:
`a` - parameter
`x` - argument
Returns:
function value
• #### incompleteGammaP

```public static double incompleteGammaP(double a,
double x)```
Incomplete Gamma function P(a,x) = 1-Q(a,x) (a cleanroom implementation of Numerical Recipes gammp(a,x); in Mathematica this function is 1-GammaRegularized)
Parameters:
`a` - parameter
`x` - argument
Returns:
function value
• #### incompleteGammaP

```public static double incompleteGammaP(double a,
double x,
double lnGammaA)```
Incomplete Gamma function P(a,x) = 1-Q(a,x) (a cleanroom implementation of Numerical Recipes gammp(a,x); in Mathematica this function is 1-GammaRegularized)
Parameters:
`a` - parameter
`x` - argument
`lnGammaA` - precomputed lnGamma(a)
Returns:
function value