java.lang.Object
org.cicirello.math.MathFunctions
MathFunctions is a class of utility methods that implement various mathematical functions.
-
Method Summary
-
Method Details
-
pow
public static double pow(double a, int b) Computes ab, where the exponent b is an integer. This is more efficient than usingMath.pow(double, double)
since it exploits the integer type of the exponent.- Parameters:
a
- The base.b
- The exponent.- Returns:
- ab
-
logGamma
public static double logGamma(double n) Implementation of the natural log of the absolute value of the gamma function.- Parameters:
n
- input parameter to the function- Returns:
- ln(abs(gamma(n)))
-