Package org.apache.commons.numbers.gamma
Class RegularizedGamma.Q
- java.lang.Object
-
- org.apache.commons.numbers.gamma.RegularizedGamma.Q
-
- Enclosing class:
- RegularizedGamma
public static final class RegularizedGamma.Q extends Object
Creates the \( Q(a, x) \equiv 1 - P(a, x) \) regularized Gamma function. Class is immutable.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static doublevalue(double a, double x)Computes the regularized gamma function \( Q(a, x) = 1 - P(a, x) \).static doublevalue(double a, double x, double epsilon, int maxIterations)Computes the regularized gamma function \( Q(a, x) = 1 - P(a, x) \).
-
-
-
Method Detail
-
value
public static double value(double a, double x)
Computes the regularized gamma function \( Q(a, x) = 1 - P(a, x) \).- Parameters:
a- Argument.x- Argument.- Returns:
- \( Q(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 \( Q(a, x) = 1 - P(a, x) \). The implementation of this method is based on:- Parameters:
a- Argument.x- Argument.epsilon- Tolerance in continued fraction evaluation.maxIterations- Maximum number of iterations in continued fraction evaluation.- Returns:
- \( Q(a, x) \).
- Throws:
ArithmeticException- if the continued fraction fails to converge.
-
-