public static double NewtonSolve(IFunc func, double from, double to, int eps) { double x, prev; prev = x = from; do { prev = x; x = prev - func.Func(prev) / func.Deriv(prev); }while (Math.Round(x, eps) != Math.Round(prev, eps)); return(x); }