Quote:

-2^2 , as written, is interpreted as (-2) ^ 2. The correct answer is 4.


Since when is -2^2 interpreted as (-2)^2 ?
You realize you just stuck in a bracket into the equation..thereby explicitly changing the equation. So if -2^2 were to be interpreted as (-2)^2 then it would have been expressed as (-2)^2. Therefore it's logically impossible for -2^2 to be interpreted as (-2)^2 because then -2^2 would not exist.

You also realize that you must be explicit about your expressions in both computing and mathematics; and if you haven't realized this yet then i (a) don't know how you managed to pass any math tests past gr.6 in your life and (b) don't know how you're able to use a computer properly. You don't tell a computer to perform -2^2 and then say 'Oh but i meant (-2)^2'. According to order of operation rules that EVERY mathematician follows, exponents are second in line after brackets. -2 is 0-2. This is all stuff you learn in basic math courses in the early high school years.

That being said, -2^2 MEANS 0 - 2^2. If you don't agree, then YOU're wrong.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"