In mathematics, Stirling's approximation (or Stirling's formula) is an asymptotic approximation for factorials. It is a good approximation, leading to accurate results even for small values of n {\displaystyle n} .
6 天之前 · Stirling's approximation gives an approximate value for the factorial function n! or the gamma function Gamma(n) for n>>1. The approximation can most simply be derived for n an integer by approximating the sum over the terms of the factorial with an integral, so that lnn! = ln1+ln2+...+lnn (1) = sum_(k=1)^(n)lnk (2) approx int_1^nlnxdx (3 ...
Stirling’s formula provides an approximation to n! which is relatively easy to compute and is sufficient for most purposes. Using it, one can evaluate log n! to better and better accuracy as n becomes large, provided that one can evaluate log n as …