Wrong result?

Topics: Help
Nov 7, 2012 at 9:01 AM
Edited Nov 7, 2012 at 9:20 AM


Hi,

it seems like NCalc is returning a wrong result.

My Code:

string expression = "100-100.01";

Expression e = new Expression(expression);  
string resultString = e.Evaluate().ToString();

 

It returns "0,0100000000000051" and not "-0,01"

For "100-110.01"  the result is -10,01, which is correct.

Am I missing something?

Thanks in advance