Factorial Calculate
非负整数的阶乘,0! = 1。
| Item | Formula / Note | Source / Standard |
|---|---|---|
| Factorial | n! = n · (n-1) · ... · 1, with the convention 0! = 1 | ISO 80000-2:2019, Quantities and units - Part 2: Mathematics |
| Recurrence | n! = n · (n-1)! | ISO 80000-2:2019, Quantities and units - Part 2: Mathematics |
| Stirling approximation | n! ≈ sqrt(2·pi·n) · (n/e)^n | Stirling J., Methodus Differentialis (1730) |
| Relation to the gamma function | Gamma(n + 1) = n!, extending the factorial to non-integer arguments | NIST Digital Library of Mathematical Functions §5.2 |
阶乘 n! = 1×2×…×n(0!=1),表示 n 个不同元素的全排列数;增长极快,13! 已超 60 亿。
普通数值类型在 n≈170 附近溢出;大数阶乘需高精度/对数近似(log(n!))。本工具按支持范围计算,超限会提示。