A negative base is a point of conflict between the three commonly used meanings of exponentiation.
- For the continuous real exponentiation operator, you're not allowed to have a negative base.
- For the discrete real exponentiation operator, we allow fractional exponents with odd denominators, and
$$(-a)^{b/c} = \sqrt[c]{(-a)^b}= \left( \sqrt[c]{-a} \right)^b = (-1)^b a^{b/c} $$
(and this is allowed because every real number has a unique $c$-th root)
- For the complex exponentiation operator, exponentiation is multivalued. An exponentiation with denominator $n$ generally takes on $n$ distinct values, although one is generally chosen as the "principal" value.
For $(-5)^{2/3}$, these three exponentiation operators give
- Undefined
- $\sqrt[3]{25}$
- $\omega \sqrt[3]{25}$ is the principal value. The other two are $\sqrt[3]{25}$ and $\omega^2 \sqrt[3]{25}$, where $\omega = -\frac{1}{2} + \mathbf{i} \frac{\sqrt{3}}{2}$ is a cube root of $1$.
Unfortunately, which meaning of exponentiation is meant is rarely ever stated explicitly, and has to be guessed from context.
I'm guessing that the second one is meant.
In case you're curious, here is part of the rationale for the first and third conventions.
In the first convention, 'continuity' is important. If two exponents are 'near' each other, then they should produce 'nearby' values when used to exponentiate. However, despite the fact $2/3$, $3/5$, and $\pi/5$ are all similarish in size, $(-5)^{2/3}$ and $(-5)^{3/5}$ are widely separated by the fact one 'should' be positive and the other negative. And it's not even clear that $(-5)^{\pi/5}$ should be meaningful!
For the third convention, the whole thing is like the idea of $\pm 2$ being the 'square root of 4', but for the fact the complexes cannot be cleanly separated into "negative" and "positive" to let us choose a specific one nicely.
A method is chosen for the principal value, based trying to get positive bases 'right' and trying to keep continuity as much as possible, but alas this convention gets the negative bases 'wrong'.
In some sense, this can be viewed as the principal value of $(-5)^{2/3}$ chosen to be "two-thirds of the way" from positive to negative.
The underlying issue here is that (assuming you want to stay within the real numbers) when $c<0$, the function $c^x$ is undefined for most values of $x$. Specifically, it's undefined unless $x$ is a rational number whose denominator is odd. There is no continuous/differentiable function underlying the places where it is defined.
Therefore, there is no possible guess-and-check algorithm that gradually becomes more accurate. First, guess-and-check algorithms require an underlying continuous function. Second, the value you're seeking might simply not be defined.
So the need to determine whether the exponent is a fraction with odd denominator, which in other contexts might be considered inelegant, here is simply a necessary step in the problem you're trying to solve. (And really, people shouldn't be inputting $c^x$ when $c<0$ and $x$ is a decimal ... they're just asking for trouble, for all the reasons mentioned above.)
Best Answer
For fractionals with something other than 1 in the numerator, simply use the law of indices which you noticed yourself:
$$a^{b/c}=\left(a^{b}\right)^{1/c}$$
The more interesting part of this question is the denominator.
Remember that $a^{1/b}=c$ means that $c^b=a$, solving for positive $a$ is always possible, however when $a$ is negative you have to notice the basic laws of what happens to the sign of the number on multiplication.
The thing is that if you have a negative number $c$ then $c^2$ is positive since negative times negative is positive. You then see that $c^3$ is negative since $c^3=c^2\cdot c$ and $c^2$ is positive and $c$ is negative.
Using this you can conclude that solving when the base is negative depends on whether the number in the exponent is even or odd.
The cases are these:
The exponent has an even denominator
Since all numbers to an even power are positive, there simply are no solutions and it's undefined.
The exponent hass an odd denominator
Negative numbers to an odd power are negative, so solving this is simply negative the solution of the equation with a positive base.