Class SpecialFunctions
java.lang.Object
org.mariuszgromada.math.mxparser.mathcollection.SpecialFunctions
SpecialFunctions - special (non-elementary functions).
- Version:
- 4.3.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic double
beta
(double x, double y) Beta special functionstatic final double
diGamma
(double x) Digamma function as the logarithmic derivative of the Gamma special functionstatic final double
erf
(double x) Calculates the error functionstatic final double
erfc
(double x) Calculates the complementary error function.static final double
erfcInv
(double z) Calculates the complementary inverse error function evaluated at x.static final double
erfInv
(double x) Calculates the inverse error function evaluated at x.static double
exponentialIntegralEi
(double x) Exponential integral function Ei(x)static final double
gamma
(double x) Real valued Gamma functionstatic double
incompleteBeta
(double a, double b, double x) Log Incomplete Beta special functionstatic final double
incompleteGammaLower
(double s, double x) Incomplete lower gamma functionstatic final double
incompleteGammaUpper
(double s, double x) Incomplete upper gamma functionstatic final double
lambertW
(double x, double branch) Real-valued Lambert-W function approximation.static final double
lanchosGamma
(double x) Gamma function implementation based on Lanchos approximation algorithmstatic final double
logarithmicIntegralLi
(double x) Logarithmic integral function li(x)static double
logBeta
(double x, double y) Log Beta special functionstatic double
logGamma
(double x) Real valued log gamma function.static final double
offsetLogarithmicIntegralLi
(double x) Offset logarithmic integral function Li(x)static double
regularizedBeta
(double a, double b, double x) Regularized incomplete Beta special functionstatic final double
regularizedGammaLowerP
(double s, double x) Regularized lower gamma function 'P'static final double
regularizedGammaUpperQ
(double s, double x) Regularized upper gamma function 'Q'static final double
sgnGamma
(double x) Signum from the real valued gamma function.
-
Constructor Details
-
SpecialFunctions
public SpecialFunctions()
-
-
Method Details
-
exponentialIntegralEi
public static double exponentialIntegralEi(double x) Exponential integral function Ei(x)- Parameters:
x
- Point at which function will be evaluated.- Returns:
- Exponential integral function Ei(x)
-
logarithmicIntegralLi
public static final double logarithmicIntegralLi(double x) Logarithmic integral function li(x)- Parameters:
x
- Point at which function will be evaluated.- Returns:
- Logarithmic integral function li(x)
-
offsetLogarithmicIntegralLi
public static final double offsetLogarithmicIntegralLi(double x) Offset logarithmic integral function Li(x)- Parameters:
x
- Point at which function will be evaluated.- Returns:
- Offset logarithmic integral function Li(x)
-
erf
public static final double erf(double x) Calculates the error function- Parameters:
x
- Point at which function will be evaluated.- Returns:
- Error function erf(x)
-
erfc
public static final double erfc(double x) Calculates the complementary error function.- Parameters:
x
- Point at which function will be evaluated.- Returns:
- Complementary error function erfc(x)
-
erfInv
public static final double erfInv(double x) Calculates the inverse error function evaluated at x.- Parameters:
x
- Point at which function will be evaluated.- Returns:
- Inverse error function erfInv(x)
-
erfcInv
public static final double erfcInv(double z) Calculates the complementary inverse error function evaluated at x.- Parameters:
z
- Point at which function will be evaluated.- Returns:
- Inverse of complementary inverse error function erfcInv(x)
-
gamma
public static final double gamma(double x) Real valued Gamma function- Parameters:
x
- Argument value- Returns:
- Returns gamma function value.
-
lanchosGamma
public static final double lanchosGamma(double x) Gamma function implementation based on Lanchos approximation algorithm- Parameters:
x
- Function parameter- Returns:
- Gamma function value (Lanchos approx).
-
logGamma
public static double logGamma(double x) Real valued log gamma function.- Parameters:
x
- Argument value- Returns:
- Returns log value from gamma function.
-
sgnGamma
public static final double sgnGamma(double x) Signum from the real valued gamma function.- Parameters:
x
- Argument value- Returns:
- Returns signum of the gamma(x)
-
regularizedGammaLowerP
public static final double regularizedGammaLowerP(double s, double x) Regularized lower gamma function 'P'- Parameters:
s
- Argument valuex
- Argument value- Returns:
- Value of the regularized lower gamma function 'P'.
-
incompleteGammaLower
public static final double incompleteGammaLower(double s, double x) Incomplete lower gamma function- Parameters:
s
- Argument valuex
- Argument value- Returns:
- Value of the incomplete lower gamma function.
-
regularizedGammaUpperQ
public static final double regularizedGammaUpperQ(double s, double x) Regularized upper gamma function 'Q'- Parameters:
s
- Argument valuex
- Argument value- Returns:
- Value of the regularized upper gamma function 'Q'.
-
incompleteGammaUpper
public static final double incompleteGammaUpper(double s, double x) Incomplete upper gamma function- Parameters:
s
- Argument valuex
- Argument value- Returns:
- Value of the incomplete upper gamma function.
-
diGamma
public static final double diGamma(double x) Digamma function as the logarithmic derivative of the Gamma special function- Parameters:
x
- Argument value- Returns:
- Approximated value of the digamma function.
-
logBeta
public static double logBeta(double x, double y) Log Beta special function- Parameters:
x
- Argument valuey
- Argument value- Returns:
- Return logBeta special function (for positive x and positive y)
-
beta
public static double beta(double x, double y) Beta special function- Parameters:
x
- Argument valuey
- Argument value- Returns:
- Return Beta special function (for positive x and positive y)
-
incompleteBeta
public static double incompleteBeta(double a, double b, double x) Log Incomplete Beta special function- Parameters:
a
- Argument valueb
- Argument valuex
- Argument value- Returns:
- Return incomplete Beta special function for positive a and positive b and x between 0 and 1
-
regularizedBeta
public static double regularizedBeta(double a, double b, double x) Regularized incomplete Beta special function- Parameters:
a
- Argument valueb
- Argument valuex
- Argument value- Returns:
- Return incomplete Beta special function for positive a and positive b and x between 0 and 1
-
lambertW
public static final double lambertW(double x, double branch) Real-valued Lambert-W function approximation.- Parameters:
x
- Point at which function will be approximatedbranch
- Branch id, 0 for principal branch, -1 for the other branch- Returns:
- Principal branch for x greater or equal than -1/e, otherwise Double.NaN. Minus 1 branch for x greater or equal than -1/e and lower than 0, otherwise Double.NaN.
-