pub fn factorial<N: PrimInt + Unsigned>(n: N) -> NExpand description
Factorial $n!$
Pure rust implementation of scipy.special.factorial(n, exact=True).
§Maximum n
Anything larger than the maximum n for the given unsigned integer type will overflow.
§Examples
assert_eq!([0_u32, 1, 2, 4, 8].map(xsf::factorial), [1, 1, 2, 24, 40_320]);§See also
factorial_checked: factorial with overflow checkingmultifactorial: multifactorial $n!_{(k)}$