7 def iteration_lagrange(x0, q0, m, epsilon, f):
9 return f(xn)!=0 and abs(xn-xnm1)>epsilon
19 qn=float((f(xn)-f(xnm1)))/(xn-xnm1)
24 test=maj_test(xn,xnm1)
28 print(iteration_lagrange(pi/4,1,200,0.0000001,f))
31 def iteration_lagrange(x0, x1, m, epsilon, f):
32 def maj_test(xn,xnm1):
33 return f(xn)!=0 and abs(xn-xnm1)>epsilon
41 qn=float((f(xn)-f(xnm1)))/(xn-xnm1)
46 test=maj_test(xn,xnm1)
52 print(iteration_lagrange(0,pi/4,200,0.0000001,f))