public static double method_tangent(double A, double B, double e, Polinom p) { double result; Polinom d = p.Differential(); Polinom d2 = d.Differential(); if (p.ResultInPoint(A) * d.ResultInPoint(A) > 0) { result = A; } else { result = B; } do { result = result - p.ResultInPoint(result) / d.ResultInPoint(result); }while (Math.Abs(p.ResultInPoint(result)) >= e); return(result); }