3 ms·
Every number is a power if you allow non-integers. But it seems indeed like it means _near_ an integer power in this case. The factorial of 3 is 6 but 6 is not
by Aardwolf 3y ago
Every number is a power if you allow non-integers. But it seems indeed like it means _near_ an integer power in this case. The factorial of 3 is 6 but 6 is not a non-trivial integer power of anything. I don't like the title either.
The article also says, you can find a base b such that n! = b^n for any factorial. Guess what, you can do this for any number x and any n to find b such that x = b^n, whether x is a factorial or not: b is x ^ (1/n). Not sure what Stirling's approximation should have to do with this, and why = and ≈ are being used inconsistently in this post.
Ignoring my complaints of this particular post, this is a pretty great blog though, and I remember being helped by the linked older blog post article about log1p and expm1 before!
- mistercow 3y agoThe Stirling's approximation part of it is about why exp(log(n!)/n) is nearly linear. I think what he's saying is basically: if you take the log version of Stirling's approximation, ln(n!) = n*ln(n) - n + O(ln(n)), ignore the big O term, then divide both sides by n and take e to the power of each side, you get the formula for the `b` from the article on the left, and n/e on the right, which is linear. I've never actually worked with Stirling's approximation, but I guess if you have a certain set of context, this fact would be obvious?
- Aardwolf 3y agoThe Stirling's approximation is a good way to implement an accurate gamma function approximation on PC/calculators/..., but it's just a formula to implement, it doesn't necessarily mean you think about fun facts like this while implementing it...
- hinkley 3y agoRational numbers yes. Irrational Number: I'm a non-integer, Greg. Can you square root me?