Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2023-01-29 21:48:51

Jai Ganesh
Registered: 2005-06-28
Posts: 46,424

Stirling's approximation

In mathematics, Stirling's approximation (or Stirling's formula) is an approximation for factorials. It is a good approximation, leading to accurate results even for small values of n. It is named after James Stirling, though a related but less precise result was first stated by Abraham de Moivre.

One way of stating the approximation involves the logarithm of the factorial:

where the big O notation means that, for all sufficiently large values of n, the difference between


will be at most proportional to the logarithm. In computer science applications such as the worst-case lower bound for comparison sorting, it is convenient to use instead the binary logarithm, giving the equivalent form

The error term in either base can be expressed more precisely as

corresponding to an approximate formula for the factorial itself,

Here the sign

  means that the two quantities are asymptotic, that is, that their ratio tends to 1 as n tends to infinity. The following version of the bound holds for all
, rather than only asymptotically:

It appears to me that if one wants to make progress in mathematics, one should study the masters and not the pupils. - Niels Henrik Abel.

Nothing is better than reading and gaining more and more knowledge - Stephen William Hawking.


Board footer

Powered by FluxBB