-
Notifications
You must be signed in to change notification settings - Fork 159
Open
Description
I am using MathParser.org-mxparser 6.1.0, and with the below expressions I am getting strange results:
| formula | results |
|---|---|
| [NaN] == 1 | NaN |
| [NaN] == 1 && 0 == 0 | NaN |
| [NaN] == 1 && 1 == 0 | 0 |
| if([NaN] == 1 && 0 == 0, 1, 2) | NaN |
| if([NaN] == 1 && 1 == 0, 1, 2) | 2 |
I have checked a few programming languages handling of NaN and the equality operator returns false (for C# and Java).
So I was expecting [NaN] == 1 to return 0 above instead of NaN.
What is the logic behind this result?
Also why is the 3rd expression returning 0, compared to the 2nd which is returning NaN?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels