Computational Physics, Python, Interpolation, Differentiation, Integration.
print(newton1) Out: -0.9999999893281472 noprime1=optimize.newton(lambda x:x**2+2*x+1,10) print(noprime1) Out: -0.999999984901414 abs(newton1-noprime1) Out: 4.426733202222977e-09 Let’s make a guess that the error is set at 10^(−16) because we are using 16 bit numbers: myresult=my_newton(f,lambda