Hacker News new | past | comments | ask | show | jobs | submit login

It’s just a power of a non integer base, which he gives a formula for



This is either incorrect or it does not really mean anything, depending on how you look at it.

It’s Stirling’s approximation, as the article mentions. The formula uses the ≈ character. The Wikipedia article gives bounds on the error—

https://en.wikipedia.org/wiki/Stirling's_approximation


but then isn't every integer a power of a (non integer) base? In this interpretation the statement is pretty useless.


And he really doesn't give a very nice formula for it.

Numerically, the point of the article is the fact that

n! \approx (0.826523 + n*0.373522)^n

For n in the range from 10 to 50, this is within 5% of the right answer.

But I really don't see that this is all that much simpler than Stirling's approximation and it is considerably less accurate and not asymptotically very good. Stirling's formula is within about 1% for all n>10 and within 0.1% for n>90.

Actually computing gamma(n) or lgamma(n) to high precision requires a bit more effort than this, but as an approximation, Stirling's formula is really pretty good.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: