def zpn(f,fprime,a): while abs(f(a))>1e-12: a = a-f(a)/fprime(a) return a