Package org.apache.commons.numbers.gamma
Class RegularizedGamma.P
- java.lang.Object
-
- org.apache.commons.numbers.gamma.RegularizedGamma.P
-
- Enclosing class:
- RegularizedGamma
public static final class RegularizedGamma.P extends Object
\( P(a, x) \) regularized Gamma function. Class is immutable.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static double
value(double a, double x)
Computes the regularized gamma function \( P(a, x) \).static double
value(double a, double x, double epsilon, int maxIterations)
Computes the regularized gamma function \( P(a, x) \).
-
-
-
Method Detail
-
value
public static double value(double a, double x)
Computes the regularized gamma function \( P(a, x) \).- Parameters:
a
- Argument.x
- Argument.- Returns:
- \( P(a, x) \).
- Throws:
ArithmeticException
- if the continued fraction fails to converge.
-
value
public static double value(double a, double x, double epsilon, int maxIterations)
Computes the regularized gamma function \( P(a, x) \). The implementation of this method is based on:- Regularized Gamma Function, equation (1)
- Incomplete Gamma Function, equation (4).
- Confluent Hypergeometric Function of the First Kind, equation (1).
- Parameters:
a
- Argument.x
- Argument.epsilon
- Tolerance in continued fraction evaluation.maxIterations
- Maximum number of iterations in continued fraction evaluation.- Returns:
- \( P(a, x) \).
- Throws:
ArithmeticException
- if the continued fraction fails to converge.
-
-