Skip to main content

Module factorial

Module factorial 

Source
Expand description

Factorial.

See the book entry The gamma function and related functions.

Constants§

MAX_U64_FACTORIAL
Largest n for which n! fits in a u64.

Functions§

factorial
Returns n!.
factorial_checked
Returns n! if it fits in a u64, otherwise None.
factorial_f64
Returns n! as an f64 (infinite for n > 170).
ln_factorial
Returns ln(n!).