📜 ⬆️ ⬇️

Modification of the Stirling Formula

In mathematics, the Stirling formula (Mohawra-Stirling) is known - a formula for the approximate calculation of factorial and gamma functions [ Stirling formula ]:


The formula is good and gives a fairly accurate approximation for large values ​​of n. For small values, the formula gives a significant error.
Empirically, I obtained an additional coefficient, which makes it possible to almost completely get rid of the error at small values ​​of n:

Comparing the calculation results using the above formulas, we see that the modified version practically does not give an error:


PS And we call the resulting formula "Moavre-Stirling-Koshelenko formula" :)

')

Source: https://habr.com/ru/post/109984/


All Articles