Unary operators like (+) and (-) should have a higher precedence over the (^) operators while being used in conjuntion with numbers.
When I execute the following command at the MATLAB command window:
-2^2
I obtain the following output:
-4
Why is the negative unary operator associated with a number not given precedence over the (^) operator?
I would like to see the following output:
4
Best Answer