# Factorial

## Factorial(n)

Computes the factorial of a positive integer «n». The factorial of a positive integer is defined as:

`n! = Product(1..n)`

and can also be obtained by means of GammaFn as

`n! = GammaFn(n + 1)`

The factorial function grows very rapidly, resulting in a numeric overflow when *«n» > 170*. However, the log factorial can often be used in its place, which can be obtained using:

`LGamma(n + 1)`

## Library

Math

## See Also

- Product
- GammaFn : The gamma function
- LGamma: The natural logarithm of the gamma function
- Combinations
- Permutations

Comments

Enable comment auto-refresher