Closed abdolsamad closed 5 years ago
Unary minus has higher precedence than power operator: var result = engine.Calculate("-1^2"); The result must become -1 but becomes +1 instead.
var result = engine.Calculate("-1^2");
I have done some research on the topic, but there does not seem to be an international accepted standard on the precedence of unary minus versus power. So I recommend to use brackets ()
Unary minus has higher precedence than power operator:
var result = engine.Calculate("-1^2");
The result must become -1 but becomes +1 instead.