Stirling's Formula/Refinement/Examples/8
< Stirling's Formula | Refinement | Examples
Jump to navigation
Jump to search
Example of Use of the Refinement to Stirling's Formula
The factorial of $8$ is given by the refinement to Stirling's formula as:
- $8! \approx 40 \, 318$
which shows an error of about $0.005 \%$.
Proof
\(\ds n!\) | \(\approx\) | \(\ds \sqrt {2 \pi n} \paren {\dfrac n e}^n \paren {1 + \dfrac 1 {12 n} }\) | Refinement to Stirling's Formula | |||||||||||
\(\ds \leadsto \ \ \) | \(\ds 8!\) | \(\approx\) | \(\ds \sqrt {2 \pi 8} \paren {\dfrac 8 e}^8 \paren {1 + \dfrac 1 {12 \times 8} }\) | |||||||||||
\(\ds \) | \(=\) | \(\ds 4 \sqrt \pi \paren {\dfrac 8 e}^8 \paren {1 + \dfrac 1 {96} }\) | ||||||||||||
\(\ds \) | \(=\) | \(\ds 2^{26} \sqrt \pi e^{-8} \dfrac {97} {96}\) | ||||||||||||
\(\ds \) | \(=\) | \(\ds 67 \, 108 \, 864 \times 1.77245 \times 0.00033 \, 546 \times 1.01014\) | ||||||||||||
\(\ds \) | \(\approx\) | \(\ds 40 \, 318\) |
We have that by the usual calculation:
- $8 \times 7 \times 6 \times 5 \times 4 \times 3 \times 2 \times 1 = 40 \ 320$
Hence:
\(\ds \frac {40320 - 40318} {40320}\) | \(=\) | \(\ds \frac 2 {40320}\) | ||||||||||||
\(\ds \) | \(\approx\) | \(\ds 0.00005\) | ||||||||||||
\(\ds \) | \(\approx\) | \(\ds 0.005 \%\) |
$\blacksquare$
Sources
- 1997: Donald E. Knuth: The Art of Computer Programming: Volume 1: Fundamental Algorithms (3rd ed.) ... (previous) ... (next): $\S 1.2.5$: Permutations and Factorials: Exercise $5$