Skip to content

factorial(n): bigint

Defined in: packages/combinatorics/src/factorial.ts:41

Count permutations of n items as a bigint, with factorial(0) = 1n.

O(n) multiplications.

number

bigint

With INVALID_COUNT for an invalid count or COUNT_TOO_LARGE if n exceeds COMBINATORICS_MAX_COUNT.