TITLE: Why does unary minus operator sometimes take precedence over exponentiation, and sometimes not?
QUESTION [7 upvotes]: How should I evaluate 2*-2^3?
Which one of these two is the correct one?

2*((-2)^3)
2*(-(2^3))


I was wondering what was the correct operator precedence. Everyone was taught at school to evaluate expressions this way:


First exponentiation and roots
Then multiplications and divisions
Finally additions and subtractions


However, for more complex operations, this table is incomplete. For instance, which precedence do unary operators have regarding to the others?
On the one hand, we can see that unary operators have lower precedence than the exponentiation in many cases.

-2^2 = -(2^2) = -4 (exponentiation first)

On the other hand, we sometimes use it differently (unary operators take precedence over exponentiation):

2^-2 = 2^(-2) = 1/4 = 0.25 (unary minus first)

I am a bit confused about this, so these are my questions:

Which would be the general correct rule for this kind of operations? I know this ambiguous problem can easily be solved putting brackets around the unary operators (but many programming languages perform those operations without needing them). Because of this, I think there should be a rule or an international standard.
How should I evaluate the following expressions?

2*-2^3    <-- the most important
  2^-3*4
  2*-3*4
  -2^-3


In order to research how modern calculators behave, I have tested 2^-3*4 in many different calculators and each one gives me a different result:
 - Google                    2^-3*4 = (2^(-3))*4 = 0.5

 - http://web2.0calc.com/    2^-3*4 = 2^(-(3*4)) ~ 0.000244140625

REPLY [2 votes]: I know that you have accepted an answer but I am tempted to add this anyway.  
The notation in your question is more typical of computing rather than mathematics.  Multiplication is rarely represented by * in mathematics and exponentiation is rarely represented by ^.  Your 2*-2^3 would be more likely to be written as $2 (-2)^3$.  Parentheses are required less often with traditional mathematical notation.  E.g. 2 ^ x + y could be written as $2^x + y$ or $2^{x + y}$ both of which are fairly unambiguous without parentheses.  Similarly, $a + b / c + d$ could be written as $a + \frac{b}{c} + d$ or $\frac{a + b}{c + d}$.  
However, traditional mathematical notation is not as perfect and precise as many might expect.  Here are some oddities:
It is quite well agreed that $\mathbb{N}$ represents the natural numbers but less well agreed whether they include $0$.
You occasional see formulae in which $e$ is an arbitrary value (probably along with $a$,  $b$ ,$c$, and $d$) but also used to represent the exponential function.  Similarly $\pi$ might be the usual famous number in one place but the prime counting function in another.
$\sin^2(x)$ almost always means $(\sin(x))^2$ rather than $\sin(\sin(x))$ yet $\sin^{-1}(x)$ almost always means $\arcsin(x)$ rather than $(\sin(x))^{-1}$.
Mathematics questions will be more welcome here in traditional mathematical notation using MathJax.  Computing questions are probably best in a computing group.