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 it was first stated by Abraham de Moivre. The version of the formula typically used in applications is (in big O notation, as ), or, by changing the base of the logarithm (for instance in the worst-case lower bound for comparison sorting), Specifying the constant in the O(ln n) error term gives 1/2ln(2πn), yielding the more precise formula:

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 it was first stated by Abraham de Moivre. The version of the formula typically used in applications is (in big O notation, as ), or, by changing the base of the logarithm (for instance in the worst-case lower bound for comparison sorting), Specifying the constant in the O(ln n) error term gives 1/2ln(2πn), yielding the more precise formula: