An efficient technique to test if an exponential of logs gives an integer

167 Views Asked by At

Is there an efficient way of testing if the resulting value of an exponential gives an integer without actually expanding the equation.

For example:

$ {\log(12) - \log(4)}=1.09861\ldots $

and is a transcendental number.

But if we take the exponential, we get an integer:

$ e^{\log(12) - \log(4)}=e^{1.09861\ldots}=3 $

This can be easily shown by proving that the equation is equivalent to $12/3$.

However is there a way to prove this while staying in the logarithm nation... We are assuming that the two numbers $12$ and $4$ are very large...

Can I find say numerical stability bounds to this simple equation:

$ 2.71828^{2.48491-1.38629}=3\ldots $

such that if I use $n$ digits, I will get an integer close the the $n$-th digit.

This may look trivial, but let's assume we do not have say $\log(12)$, but only $2.48491 \ldots$ up to some precision of k-digits. Same thing for $\log(4)$, etc.

1

There are 1 best solutions below

0
On

If you write your log numbers as $x$ and $y$. Then you can find the upper and lower bound (depending on sign) with $\exp(x\pm\epsilon_x-y\mp\epsilon_y)$ where $\epsilon$ are the errors (something like $0.5/10^{k+1}$). If an integer is not included in the range then you can be certain that it is not an integer.