For a positive real number $x$, and an integer $n$, i'd like to compute $\lfloor x^n \rfloor$. The $n$ here will be quite large, so I want to know how precise my approximation of $x$ needs to be to guarantee $\lfloor x^n \rfloor$ takes on the correct value. I've come up an equation that solves for this:
$$\min_m \quad x^n - (x-\frac{1}{10^m})^n < 1$$
This guarantees $\lfloor (x-\frac{1}{10^m})^n\rfloor$ to be either $\lfloor x^n \rfloor$ or $\lfloor x^n \rfloor - 1$ (to prove this just re-arrange the above expression, and note $x^n$ is strictly larger than the approximation.) Is there an efficent way to calculate the minimum $m$ here? Or is there a better method altogether that guarantees $\lfloor x^n \rfloor$? I've noticed that lowering the value of the RHS increases the probability that the approximation will be correct given random $x$.