What you apparently misunderstand is the idea of operator precedence.
There is a difference between these two operations:
What you need to recognize is that ^ operates before the unary minus operator. Once you recognize that, you recognize it is not a bug, but a design question, and one that makes some sense.
You are not the first person to trip over it though. I've seen this question asked before. :)