Closed Ramin9072 closed 1 year ago
You can use the SetDefaultNumberType
method to force the interpreter to consider all numbers as double:
var interpreter = new DynamicExpresso.Interpreter();
interpreter.SetDefaultNumberType(DynamicExpresso.DefaultNumberType.Double);
var result = interpreter.Eval<double>("115804936*20/100");
Console.WriteLine(result);
Otherwise, all numbers are considered as integers and you're facing an integer overflow.
Cool that's work
hello When it comes to these numbers in calculations, we face errors in the calculation this is a my numbers 115804936*20/100 Result must be 23160987.2 but in class and live code http://dynamic-expresso.azurewebsites.net/ Result is -19788685