dynamicexpresso / DynamicExpresso

C# expressions interpreter
http://dynamic-expresso.azurewebsites.net/
MIT License
2.02k stars 379 forks source link

Error in expression evaluation #303

Closed lesha724 closed 10 months ago

lesha724 commented 10 months ago

Hello everyone. I get mistake, when I try evaluate next expression:

var result = new Interpreter().Eval<bool>("78/83==61/96");

The result value is true, but 78.0/83.0==61.0/96.0 has correct value false.

I use version 2.16.1.

1

lesha724 commented 10 months ago

I founded solution:

interpreter.SetDefaultNumberType(DefaultNumberType.Decimal);