Hi Rioven,
Thank's for updating the program.
-2^2 = -4 that's normal and must be so !
Some comments on that. Let's take two examples with the equation and it's literal meaning:
1) -2^2 means: minus the square of number two
2) (-2)^2 means: the square of the number minus two
The difference is due to the order of operations
Order of operations - Wikipedia, the free encyclopedia (you know this link from another thread, I put it here if other readers who might be interseted in).
1) The operator with the highest level is ^, on it's right is the exponent and it's the number 2, on it's left it's a also a number 2. So the result is the square of the number two and minus the result, so -4.
2) The operator with the highest level is ^, on it's right is the exponent and it's the number 2, on it's left it's a bracket so the ^operator applies to the content between the two brackets which is number minus two and the result is the square of the number minus two = 4
In the first case minus is an operator and in the second one it belongs to the number.
I hope this is not too pedantic.
I am shure that Filippo will be happy with the update, he is using your evaluator in his
http://www.b4x.com/forum/german-forum/3692-b4p-calculator.html#post21633 calculator. A pretty nice looking calculator.
Best regards.