Non-integer power of a negative number.

When the exponent of a negative number is a non-integer number, Excel is sometimes happy:

(-5)sup[/sup] → -1.06649
(-5)sup[/sup] → -1.70998
(-5)sup[/sup] → -1.37973

And is sometimes unhappy:

(-5)[sup]0.7[/sup] → #NUM!
(-5)sup[/sup] → #NUM!

It is unhappy more often than happy.

What gives?

Excel likes real numbers, but not complex ones. When you take an odd root of a negative number, like the 25th root (your first example), the third root (your second example) or the fifth root (your third example), you’re fine, since a negative number to any odd power is also negative. For even roots, though, Excel runs into complex numbers, and rejects the calculation (note that for the .7th power, Excel starts by trying to take the 10th root - an even root).

Ps. It looks like there’s a way to get Excel to do complex calculations, with an Addin

Excel does have a collection of functions for complex arithmetic: There’s a COMPLEX() constructor which takes an ordered pair of reals, and returns a complex number, and those can be operated upon by IMSUM, IMPRODUCT, IMDIV, etc. But I don’t know if there is a complex root function.

ETA: Ah-ha! There is an IMSQRT.

Out of wonder, is there a way to tell the “evenness” or “oddness” of an irrational for determining whether the root is complex? Like what if I has (-5)[sup]1/e[/sup] or (-5)[sup]1/pi[/sup]? Or perhaps rather than being pure imaginary or pure real the root is complex?

(Not that this applies to excel since it probably only uses fixed-bit size floating point numbers and thus even irrationals are secretly rational).

Even- and odd-ness are properties of integers. Since e and π are irrational, so are their reciprocals.

(-5)[sup]1/e[/sup] would be a complex number. You can get there by 5[sup]1/e[/sup]cos(π/e) + i5[sup]1/e[/sup]sin(π/e). The result is left as an exercise for the reader, because I don’t want to do it.

Strictly speaking, the non-integer power of any number (positive or negative) is multi-valued, and for any power other than a half-integer, most of the values are going to be nonreal. It’s just that, for positive bases, it’s easy to pretend that this isn’t a problem, because there will always be exactly one positive real value, and we can just declare that that’s the one we mean. But for negative (or nonreal) bases, if one tries to establish which of the results is “the one we mean”, one ends up with inconvenient discontinuities.

As an example of this, note that if we naively apply friedo’s method to the numbers mentioned in the OP, we would get (for example)

(-5)[sup]1/3[/sup] = 5[sup]1/3[/sup]( cos(π/3) + i sin(π/3) )

which isn’t real either.

In general, out of the many values of (-a)[sup]x[/sup], some of them will be real if x = m/n, where m is an integer and n is an odd integer. But you can’t define a continuous function having the property that f(x) = (-5)[sup]x[/sup] everywhere that takes on real values at both x = 1/3 and x = 1/5.