Combinatorics: nPr, nCr, n!

Count ordered selections ($P(n,k)$), unordered selections ($C(n,k)$), or compute $n!$. Messages warn when IEEE doubles cannot represent the exact integer.

What it computes. Standard counting formulas with multiplicative loops / log-space fallbacks.
Limitations. $n!$ overflows past 170 in double precision; huge $C(n,k)$ may only be approximate. See the disclaimer.

Related: Binomial probability · Probability & statistics