I'm developing an algorithm to compare if the result of $n!$ is bigger than $k^m$, but I have problems with big integers, then I need to know if there's some property that I can use to do this without knowing the results.
Help please. :/
I'm developing an algorithm to compare if the result of $n!$ is bigger than $k^m$, but I have problems with big integers, then I need to know if there's some property that I can use to do this without knowing the results.
Help please. :/
Take natural logs of both and use Stirling.
$$\ln(k^m) =m \ln(k) \text{ and } \ln(n!) \approx \frac12 \ln(2 \pi)+(n+\frac12)\ln(n) - n. $$
Comparing these should be no problem.