Closed DaveMartel closed 5 years ago
the power is done via the function POW https://github.com/pitermarx/NCalc-Edge/wiki/Functions
^ is the operator for bitwise xor https://github.com/pitermarx/NCalc-Edge/wiki/Operators
I'll investigate if there is a power operator, or if it is a bug in the wiki
After reading the code, I think this is a bug in the wiki. I'll remove it. Thanks for the warning
Thanks. I understand that ^ is the operator for bitwise xor.
My biggest issue is going to be the fact my users are used to ^ being the power operator and I am pretty sure they are going to try and use it that way. Now got to work out how to warn them, or override what they type... :-)
is there any way to override the ^ operator? my end users will be typing ^ not Power
no, I don't think there is
The wiki (operators page) mentions "Power" as a possible operator or operator type. The standard notation for power as far as I understand it elsewhere would be '^'. However '^' is used as the operator for bitwise or. After mentioning that power is possible, there is nothing further as to what the actual operator is.
I know there is Power (x, y) in the functions.
It is just that I am fairly confident that my users are going to expect to type (x^2) to square a number and I have check that the evaluator does in fact do a bit wise or of 2 against x.
Thanks for any enlightenment.