Operator '/' can't be applied to operands of types 'decimal' and 'double' - NCalc
问题 I'm trying to run this formula in NCalc: "( Abs([a] - [b]) / ( ([a] + [b]) / 2.0 ) ) * 100" I get the error: Operator '/' can't be applied to operands of types 'decimal' and 'double' The [a] and [b] parameters are passed as Decimals. I tried putting 'm' on the 2 and 100 like so: "( Abs([a] - [b]) / ( ([a] + [b]) / 2m ) ) * 100m" But it throws an exception: Additional information: extraneous input 'm' expecting ')' at line 1:36 I followed this question, but it didn't help me. The same question