n! = n × (n−1) × … × 1
Factorial Calculate
📐 計算公式
階乘(本頁程式碼口徑):n!=1×2×…×n 用 BigInt 精確累乘。聯動量:科學計數值、完整精確整數(千分位)、ln(n!)、幾何平均 (n!)^(1÷n)。校驗:n 必須為非負整數,空值、小數、負數報錯;為控制頁面體量上限 1000,並用 BigInt 精確計算;n=0 時 0!=1,幾何平均無定義顯示「—」。判據:無固定分級,n! 增長快於指數;科學計數與完整整數分開展示,避免把浮點近似值冒充精確值。
非負整數的階乘,0! = 1。
Formula & Standard References
| 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 |
📌 計算說明
- 0! = 1。
- 10! = 3,628,800。