How to calculate a decimal power of a number

Solution 1:

For positive bases $a$, you have the general rule $$a^b = \exp(b\ln(a)) = e^{b\ln a}.$$

This follows from the fact that exponentials and logarithms are inverses of each other, and that the logarithm has the property that $$\ln(x^r) = r\ln(x).$$

So you have, for example, \begin{align*} (2.14)^{2.14} &= e^{\ln\left((2.14)^{2.14}\right)} &\quad&\mbox{(because $e^{\ln x}=x$)}\\ &= e^{(2.14)\ln(2.14)} &&\mbox{(because $\ln(x^r) = r\ln x$)} \end{align*} Or more generally, $$a^b = e^{\ln(a^b)} = e^{b\ln a}.$$

In fact, this is formula can be taken as the definition of $a^b$ for $a\gt 0$ and arbitrary exponent $b$ (that is, not an integer, not a rational).

As to computing $e^{2.14\ln(2.14)}$, there are reasonably good methods for approximating numbers like $\ln(2.14)$, and numbers like $e^r$ (e.g., Taylor polynomials or other methods).

Solution 2:

A decimal power can be seen as a fraction:

$x^{\frac{a}{b}} = \sqrt[b]{x^a}$

Of course you cannot write every number as a fraction, but you can at least approximate every number by a fraction.