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
Hi everybody,
I noticed that when OptionForceIntegerNumbersEvaluationsAsDoubleByDefault is turned on, the Round function would throw an Invalid cast exception.
The problem in around line 471, where: return Math.Round(Convert.ToDouble(self.Evaluate(args[0])), (int)self.Evaluate(args[1]), (MidpointRounding)self.Evaluate(args[2]));
tries to cast to int a (now forced) Double value.
I suggest to substitute the cast with a Convert.ToInt32()
Same thing a few rows down, always with Math.Round() call.
The text was updated successfully, but these errors were encountered:
Hi everybody,
I noticed that when OptionForceIntegerNumbersEvaluationsAsDoubleByDefault is turned on, the Round function would throw an Invalid cast exception.
The problem in around line 471, where:
return Math.Round(Convert.ToDouble(self.Evaluate(args[0])), (int)self.Evaluate(args[1]), (MidpointRounding)self.Evaluate(args[2]));
tries to cast to int a (now forced) Double value.
I suggest to substitute the cast with a Convert.ToInt32()
Same thing a few rows down, always with Math.Round() call.
The text was updated successfully, but these errors were encountered: