
public final class Factorial extends Object
| Modifier | Constructor and Description |
|---|---|
private |
Factorial()
Hiding constructor for utility class.
|
| Modifier and Type | Method and Description |
|---|---|
static BigDecimal |
factorial(int n)
Calculate the factorial of n.
|
static double |
lnFactorial(int n)
Returns the value of the natural logarithm of
factorial n.
|
public static BigDecimal factorial(int n)
n - the number to calculate the factorial of.public static double lnFactorial(int n)
n - the integer for which the log-factorial has to be computedCopyright © 2015 University of Glasgow. All rights reserved.