# HP Forums

You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Why is -8^(2/3)=-4 instead of 4?
(07-16-2014 01:48 AM)lrdheat Wrote: [ -> ]Why is -8^(2/3)=-4 instead of 4?

-8^(2/3)=-(8^(2/3))=-4
(-8)^(2/3)=4
(07-16-2014 02:08 AM)Waon Shinyoe Wrote: [ -> ]-8^(2/3)=-(8^(2/3))=-4
(-8)^(2/3)=4

FWIW, I explain that to my students as an "algebraic order of operations" thing. To evaluate -2², the exponent must be handled before the negative sign. So -2² means -(2²), not (-2)².
(07-16-2014 02:08 AM)Waon Shinyoe Wrote: [ -> ](-8)^(2/3)=4

Careful -- fractional exponentiation of negative numbers is a thorny issue, and the answer is different depending on the assumed domain and the precise definition of the exponentiation operator (which was not specified here). Although 4 is typically the accepted answer in the real domain, a more general interpretation (based on analytic continuation of exponentiation in the complex domain) is that there are THREE answers of the form $(-8)^{2/3}= \{4\omega, 4\omega^2, 4\},$ where $\omega = -\frac{1}{2} + i\frac{\sqrt{3}}{2}$ is the so-called principal cube root of unity. (Try evaluating $$\omega^3$$ if you don't believe it.) The first of these three answers, $4\omega = -2 + i2\sqrt{3},$ would generally be considered the principal answer.

If you don't believe me, consult a higher authority: try evaluating (-8)^(2/3) on an HP-42S and see what it says.
(07-16-2014 06:01 AM)John R Wrote: [ -> ]The first of these three answers, $4\omega = -2 + i2\sqrt{3},$ would generally be considered the principal answer.
This is the answer returned by the HP Prime in CAS mode:
(07-16-2014 01:48 AM)lrdheat Wrote: [ -> ]Why is -8^(2/3)=-4 instead of 4?
It is a convention to have the unary minus as a shortcut for (your example) 0-8^(2/3). So, a written negative number is not atomic, nor does the unary minus have a priority different from the binary minus. This is strange enough to have many people fall for expectations like yours.
(07-16-2014 02:02 PM)Thomas Radtke Wrote: [ -> ]
(07-16-2014 01:48 AM)lrdheat Wrote: [ -> ]Why is -8^(2/3)=-4 instead of 4?
It is a convention to have the unary minus as a shortcut for (your example) 0-8^(2/3).

Hmmh, AFAIK the convention is the unary minus corresponds to a multiplication times (-1). So, in this case, -8^(2/3) = (-1)*8^(2/3) = (-1)*4 = -4.

d:-)
Thanks all...(order of precedence on calculating device).. I thought I was losing it!
(07-16-2014 02:35 PM)walter b Wrote: [ -> ]Hmmh, AFAIK the convention is the unary minus corresponds to a multiplication times (-1).
ok, and what is (-1)? Maybe 0-1?

;^)
(07-16-2014 02:53 PM)lrdheat Wrote: [ -> ]Thanks all...(order of precedence on calculating device).. I thought I was losing it!
No, order of precedence in algebra and usable calculating devices.

Sorry for nitpicking ;-).
(07-16-2014 06:01 AM)John R Wrote: [ -> ]
(07-16-2014 02:08 AM)Waon Shinyoe Wrote: [ -> ](-8)^(2/3)=4

Careful -- fractional exponentiation of negative numbers is a thorny issue, and the answer is different depending on the assumed domain and the precise definition of the exponentiation operator (which was not specified here). Although 4 is typically the accepted answer in the real domain, a more general interpretation (based on analytic continuation of exponentiation in the complex domain) is that there are THREE answers of the form $(-8)^{2/3}= \{4\omega, 4\omega^2, 4\},$ where $\omega = -\frac{1}{2} + i\frac{\sqrt{3}}{2}$ is the so-called principal cube root of unity. (Try evaluating $$\omega^3$$ if you don't believe it.) The first of these three answers, $4\omega = -2 + i2\sqrt{3},$ would generally be considered the principal answer.

If you don't believe me, consult a higher authority: try evaluating (-8)^(2/3) on an HP-42S and see what it says.

Interesting... and my HP-15C gives me an Domain Error.
I mean, using -8^( 2/3)
(07-16-2014 07:48 PM)jebem Wrote: [ -> ]Interesting... and my HP-15C gives me an Domain Error.
I mean, using -8^( 2/3)

Try setting the 15C to complex mode (g SF 8).
(07-16-2014 08:38 PM)Mark Hardman Wrote: [ -> ]
(07-16-2014 07:48 PM)jebem Wrote: [ -> ]Interesting... and my HP-15C gives me an Domain Error.
I mean, using -8^( 2/3)

Try setting the 15C to complex mode (g SF 8).

Yes, the HP-15C answer is a complex number:
-2.0000 for real and 3,4641 for imaginary part.
where 3,4641 should be the approximation for 2*sqrt(3)

and of course my HP-42S doesn't even need to be told to enter complex mode, as it just gave a straight answer in the x stack register:
x: -2.0000 i3.4641

And just for the record, a HP-27S answer for -8^( 2/3) is:
ERROR: NEG^NONINTEGER

(-8)^(2 / 3) =
-2 + 3,46410162 i
(07-16-2014 05:07 PM)Thomas Radtke Wrote: [ -> ]
(07-16-2014 02:35 PM)walter b Wrote: [ -> ]Hmmh, AFAIK the convention is the unary minus corresponds to a multiplication times (-1).

ok, and what is (-1)?

-1 = (-1)*1
(07-16-2014 08:57 PM)jebem Wrote: [ -> ]and of course my HP-42S doesn't even need to be told to enter complex mode, as it just gave a straight answer in the x stack register:
x: -2.0000 i3.4641

If desired -- possibly for strict compatibility with the 41C series -- the 42S can be told to suppress complex results that would otherwise be generated from real arguments. This can be done by selecting RRES in the MODES menu, which sets flag 74.
(07-16-2014 09:43 PM)John R Wrote: [ -> ]
(07-16-2014 08:57 PM)jebem Wrote: [ -> ]and of course my HP-42S doesn't even need to be told to enter complex mode, as it just gave a straight answer in the x stack register:
x: -2.0000 i3.4641

If desired -- possibly for strict compatibility with the 41C series -- the 42S can be told to suppress complex results that would otherwise be generated from real arguments. This can be done by selecting RRES in the MODES menu, which sets flag 74.

Thanks, John!
Reference URL's
• HP Forums: https://www.hpmuseum.org/forum/index.php
• :