Catalano.Math
Class Special
- java.lang.Object
-
- Catalano.Math.Special
-
public final class Special extends java.lang.ObjectSet of special mathematic functions.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static doubleBinomial(int n, int k)Computes the binomial coefficients C(n,k).static doubleBSpline(int n, double x)Computes the Basic Spline of ordern .static doubleEpslon(double x)Estimates unit roundoff in quantities of size x.static doubleErf(double x)Error function of the specified value.static doubleErfc(double value)Complementary error function of the specified value.static doubleExpm1(double x)Compute exp(x) - 1 without loss of precision for small values of x.static doubleFactorial(int n)Computes the factorial of a number (n!).static doubleLog1m(double x)Computes log(1-x) without losing precision for small values of x.static doubleLog1p(double x)Computes log(1+x) without losing precision for small values of x.static doubleLogBinomial(int n, int k)Computes the log binomial Coefficients Log[C(n,k)].static doubleLogDiff(double lna, double lnc)Computes x + y without losing precision using ln(x) and ln(y).static doubleLogFactorial(int n)Returns the log factorial of a number (ln(n!))static doubleLogSum(double lna, double lnc)Computes x + y without losing precision using ln(x) and ln(y).static doubleLogSum(float lna, float lnc)Computes x + y without losing precision using ln(x) and ln(y).static doubleP1evl(double x, double[] coef, int n)Evaluates polynomial of degree N with assumption that coef[N] = 1.0static doublePolevl(double x, double[] coef, int n)Evaluates polynomial of degree N.static doubleSign(double a, double b)Returns A with the sign of B.
-
-
-
Method Detail
-
Erfc
public static double Erfc(double value)
Complementary error function of the specified value.- Parameters:
value- Value.- Returns:
- Result.
-
Erf
public static double Erf(double x)
Error function of the specified value.- Parameters:
x- Value.- Returns:
- Result.
-
Polevl
public static double Polevl(double x, double[] coef, int n)Evaluates polynomial of degree N.- Parameters:
x- Value.coef- Coefficient.n- Degree.- Returns:
- Result.
-
P1evl
public static double P1evl(double x, double[] coef, int n)Evaluates polynomial of degree N with assumption that coef[N] = 1.0- Parameters:
x- Value.coef- Coefficient.n- Degree.- Returns:
- Result.
-
BSpline
public static double BSpline(int n, double x)Computes the Basic Spline of ordern .
-
Binomial
public static double Binomial(int n, int k)Computes the binomial coefficients C(n,k).- Parameters:
n- Coefficient.k- Coefficient.- Returns:
- Result.
-
LogBinomial
public static double LogBinomial(int n, int k)Computes the log binomial Coefficients Log[C(n,k)].- Parameters:
n- Coefficient.k- Coefficient.- Returns:
- Result.
-
LogFactorial
public static double LogFactorial(int n)
Returns the log factorial of a number (ln(n!))- Parameters:
n- Number.- Returns:
- Result.
-
Factorial
public static double Factorial(int n)
Computes the factorial of a number (n!).- Parameters:
n- Number.- Returns:
- Result.
-
Log1m
public static double Log1m(double x)
Computes log(1-x) without losing precision for small values of x.- Parameters:
x- Value.- Returns:
- Result.
-
Log1p
public static double Log1p(double x)
Computes log(1+x) without losing precision for small values of x.- Parameters:
x- Value.- Returns:
- Result.
-
Expm1
public static double Expm1(double x)
Compute exp(x) - 1 without loss of precision for small values of x.- Parameters:
x- Value.- Returns:
- Result.
-
Epslon
public static double Epslon(double x)
Estimates unit roundoff in quantities of size x.- Parameters:
x- Value.- Returns:
- Result.
-
Sign
public static double Sign(double a, double b)Returns A with the sign of B.- Parameters:
a- Value.b- Value.- Returns:
- Result.
-
LogDiff
public static double LogDiff(double lna, double lnc)Computes x + y without losing precision using ln(x) and ln(y).- Parameters:
lna- Value.lnc- Value.- Returns:
- Result.
-
LogSum
public static double LogSum(double lna, double lnc)Computes x + y without losing precision using ln(x) and ln(y).- Parameters:
lna- Value.lnc- Value.- Returns:
- Result.
-
LogSum
public static double LogSum(float lna, float lnc)Computes x + y without losing precision using ln(x) and ln(y).- Parameters:
lna- Value.lnc- Value.- Returns:
- Result.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG