def newton3(f,x0,e,h): x = x0 while abs(f(x))>e: d = (f(x+h)-f(x))/h #on calcule une approximation du nombre dérivé en x x = x-f(x)/d return x