Ah yes, you're wrong. -2**2 is -4, (-2)**2 is 4.
Assume that -2**2 = 4, now add zero to both sides and you have 0 - 2**2 = 0 + 4, reduce the exponent and you have 0 - 4 = 0 + 4 (exponentiation definitely binds tighter than subtraction), which reduces to -4 = 4 which is obviously not true.
In reply to Re: Operator Precedence (unary negation and exponentiation)
by pdcawley
in thread Operator Precedence (unary negation and exponentiation)
by Elliott
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |