Class Factorial
java.lang.Object
com.ibm.wala.util.math.Factorial
Factorial utilities
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doublefact(double n) Factorial on doubles; avoids overflow problems present when using integers.static intfact(int n) Factorialstatic longfact(long n) Factorialstatic BigIntegerfact(BigInteger n) Factorial
-
Constructor Details
-
Factorial
public Factorial()
-
-
Method Details
-
fact
public static long fact(long n) Factorial -
fact
Factorial -
fact
public static double fact(double n) Factorial on doubles; avoids overflow problems present when using integers.- Parameters:
n- arg on which to compute factorial- Returns:
- (
doubleapproximation to) factorial of largest positive integer <= (n_ + epsilon)
-
fact
public static int fact(int n) Factorial
-