Update newton_raphson.py

This commit is contained in:
Rohan Anand 2023-07-16 21:07:51 +05:30 committed by GitHub
parent 064bc8cb88
commit 27b1bbacb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,7 +22,7 @@ def newton_raphson(
2.718281828458938
>>> from scipy.optimize import newton
>>> all(newton_raphson("log(x)- 1", 2) == newton("log(x)- 1", 2)
... for precision in 10, 100, 1000, 10000))
... for precision in (10, 100, 1000, 10000))
True
>>> newton_raphson("log(x)- 1", 2, 0)
Traceback (most recent call last):