public static double CalculateExactRemainder(Expr func, FloatingPoint point, int order) { var pointVar = new Dictionary <string, FloatingPoint> { { "x", point } }; var taylorExpr1 = GetTaylorExpression(order + 1, Expr.Variable("x"), 0, func); var trueValue = func.Evaluate(pointVar); var taylorValue = taylorExpr1.Evaluate(pointVar); return(trueValue.RealValue - taylorValue.RealValue); }
//Раcчет значения правой части ОДУ f(x, y1, y2 ... yn) public double F(Dictionary <string, FloatingPoint> vars) { FloatingPoint res = function.Evaluate(vars); return(res.RealValue); }
// We assume that the variables match between each side public double SquareNorm() { Expr symbolicSquareNorm = Real.Pow(2) + Imag.Pow(2); return(symbolicSquareNorm.Evaluate(new Dictionary <string, FloatingPoint>()).RealValue); }