lol goldenratio's a computer programmer - i hope that was a joke vote
PS. logic is much more important than knowing some specific rules of maths in programming. The -4^2 thing is not a "of course! it's so logical" thing. It's something that must be taught, because I would say that it's just as logical to think -4^2 is 16 than it's -16, if you don't know about the unary negation and its precedence in relation to other operators. It's not THAT terrible that people think -4^2 is 16 (it's a bit sad), what is terrible is that there are people who absolutely REFUSE TO BELIEVE IT, even if they're shown proof, and continue to argue that it's 16, which happened in the previous -4^2 topic.
it's probably just people who see -4 as a single number and not -1*4. After that you just got order of operations which maybe people don't know?
It is a single number really. Real numbers can be negative as well. It's just that a number can contain an operator in it. Although -4 yields same result as -1*4, it doesn't mean that you're supposed to expand it to that everytime you see it, although it does help you to illustrate the issue at hand. The reason why -4^2 is -16 is because the little "-" before 4 is an operator of its own, and it has its own precedence. If you used the logic that -4 is -1*4, then -1*4 would be -1*1*4, and that would be -1*1*1*4 etc.
The way you guys are speaking is going way over my head. Isn't unary something to do with pissing?
Unary means that it takes a single operand. Operators like addition, subtraction, multiplying and division are binary operators, which means that they take two operands.