Description Usage Arguments Value References Examples
Stirling's approximation is a method of approximating a factorial n!. As the value of n increases, the more exact the approximation becomes; however, it still yields almost exact results for small values of n. The approximation used is given by Gosper, which is noted to be a better approximation to n! and also results in a very close approximation to 0! = 1.
n! \approx √{(2n + \frac{1}{3})π} n^n e^{-n}
1 | stirling(n)
|
n |
desired integer to approximate factorial |
the approximated factorial, n! per Gosper's approximation
Stirling's approximation. (2017, March 8). In Wikipedia, The Free Encyclopedia. From https://en.wikipedia.org/w/index.php?title=Stirling Weisstein, Eric W. "Stirling's Approximation." From MathWorld–A Wolfram Web Resource. http://mathworld.wolfram.com/StirlingsApproximation.html
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.