I've given this a lot of thought, and I came up with what I hope is an informed opinion. The question here is this: in the equation -2^2, is the - associated with just the 2 that it is next to, or is it associated with the entire 2^2? That is, would -2^2 be (-2)^2, or -(2^2). The answer, according to the correct order of operations, is -(2^2), or -4.
However, in:
var %negativetwo = -2
echo -a $calc(%negativetwo ^2)
the - is
clearly and unambiguously associated with the 2 only, and so the echo should give 4.
Now it comes down to whether or not mIRC's parser will allow $calc to know that the -2 in there came from a variable, and treat it as such (perhaps by, at least internally, enclosing it in parenthesis/brackets.)
Here is the part of the show where I list pros and cons for "fixing" this:
Pros:
a) It would be technically correct (the only pro I can think of)
Cons:
a) It will likely break at least some scripts out there.
b) fixing it
must not come at the expense of breaking legitimate code, such as the example with %variables. I don't have an intimate knowlege of mIRC's script parser, so I don't know how easy that would be, or even if it could be done without extensive modification.
In conclusion, if I were to be the one to make this decision, I would decide based upon how much work would have to be put into it. I see little sense in working long hours to fix something that nobody noticed until shortly before the product's 10th anniversary (happy b-day, mIRC!!) if someone else is going to complain that now their script doesn't work. Fortunately, the burden isn't on me, but it is Khaled that must choose.
In other news, I hear that Microsoft Excel
agrees with mirc that -2^2 = 4.