09-08-2009 07:51 AM
The formular parser of the evaluation VIs calculates 1-2^2=5, as for 1+ (-2)^2.
The formula&expression nodes give -3, as expected (using ** instead of ^).
Why that? Precedence of operators should be the same.
Dirk
09-08-2009 09:41 AM
That's not just a precedence issue, that is plain wrong! It still gets it wrong when you add a second '-' to make it 1 - -2^2. It is funny since I would have expected it to either get the right answer for the wrong reason 1 - (-2)^2 (ie. use the minus sign as both negation and subtraction) or fail altogether by using the minus sign for negation and then finding no operator between 1 and (-2)^2. It goes out of its way to insert an addition operation.
I have liked the evaluation VIs on a limited basis, and now that basis is very limited.