Skip to content

logBinomialCoefficient(n, k): number

Defined in: packages/combinatorics/src/binomial-coefficient.ts:41

Take the natural logarithm of the number of combinations of k from n items for any non-negative safe integer counts. Returns -Infinity for k > n.

O(1) time. Evaluates the logarithmic ratio without subtracting two large log-factorials.

number

number

number

With INVALID_COUNT for an invalid count.