You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var evaluator = new ExpressionEvaluator()
{
OptionForceIntegerNumbersEvaluationsAsDoubleByDefault = true
};
string expression = "3/Math.Round(Avg(1,2),MidpointRounding.AwayFromZero)";
Console.WriteLine(expression);
Console.WriteLine(evaluator.Evaluate(expression));
gives the error
Unhandled exception. Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Operator '/' cannot be applied to operands of type 'double' and 'decimal'
It worked in 1.4.20 and first stopped working in 1.4.21. Math.Round is picking the decimal overload when I'd expect it to pick the double overload. It works without OptionForceIntegerNumbersEvaluationsAsDoubleByDefault.