Rational exponents in terms of simple operations

27 Views Asked by At

So I have to do a geometric average on a website that doesn't have the geometric average function.

Furthermore, it doesn't allow power or root operators, it only has multiplication, division, addition and subtraction.

How would I represent a $x^{\frac13}$ as ONLY *,/,+,-?

Is it even possible?

1

There are 1 best solutions below

2
On BEST ANSWER

It is not possible to compute exactly $x^{1/2}$, $x^{1/3}$ or any other non-integral power of $x$ using only $+-×÷$ for general $x$. Suppose $x$ is rational, then any expression with $x$, decimal constants and the four operations remains rational, yet $x$ is usually irrational (think $\sqrt2$).

Thus numerical methods will be required to compute such powers to sufficient precision. There are many such methods available for $n$th roots, which is all that is required for the geometric mean. The "classic" approach (naming the number to take the $n$th root of as $A$) starts from some guess $x_0$ and iterates $x_{k+1}=x_k+\frac{Ax_k^{1-n}-x_k}n$.