I trying to order a list of mathematical expressions in string format as:
"2*2"
"4^1"
"4^2^5"
so far, so good for non exponential operations (^). I could compute the final result.
Except for exponential operations, cos take tooo long to compute, e.g.: $100^{20^{10}}$
My question is:
How tell if :
$1oo^{40}$ is bigger than $2^{22^{20}}$ ?
p.s: without computing the expression.
EDIT
how I can scale in this case
$100^{20^{2^{2}}}$ < $10^{2^{2^{2^{2^{2}}}}}$ ??
As others have noted, logarithms definitely make things look more comparable.
$$10^{40},2^{22^{20}}$$
$$40,22^{20}\log_{10}(2)$$
We can quickly see that $40<22^{20}$ and that $\log_{10}(2)>0.01$
From this it seems clear that $40<(0.01)22^{20}<22^{20}$.