1
$\begingroup$

For example, through (lots of) trial and error with a calculator, I figured out that:

1.551e+25 is approximately equal to 2^83.6814

Is there an equation or algorithm for a conversion like this?

Thanks!

$\endgroup$
  • 2
    $\begingroup$ Take logs base $2$ and round? $\endgroup$ – lulu Apr 24 at 20:40
3
$\begingroup$

Given a number $N$ you want to find a number $x$ such that $2^x\approx N$. By definition $$x=\log_2N=\frac{\log N}{\log 2}.$$ This will not be a rational number in general, but you can round it to get a good approximation.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.