I have the following using MathNet library where child1 is -4.09 and child2 is -4.162. The result after Expression.Real((double1 - double2)) returns 0.072000000000000064. It should be 0.072. Can anyone please help me understand what is going on?
private static Expression GetSimplifiedExpression(Expression child1, Expression child2, LaTeXTokenType tokenType)
{
double double1 = Evaluate.Evaluate(null, child1).RealValue;
double double2 = Evaluate.Evaluate(null, child2).RealValue;
return Expression.Real((double1 - double2));
}