asc-community/AngouriMath

EvalBoolean returns true on NaN-compare

Closed this issue · 2 comments

Steps to reproduce

  • Create following expression: "1 / 0 > 2"
  • Evaluate boolean (expr.EvalBoolean())

Result
This returns true

Expected Result
NaN or an Exception should be returned

The reason it happens is this line:

(Real reLeft, Real reRight) => reLeft > reRight,

there should be checks on NaN

Thanks for the report, I'll soon it fix

Fixed, thanks for reporting! The fix will be available since 1.4.0-preview.2