mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-02-25 02:18:39 +00:00
Update newton_raphson.py
This commit is contained in:
parent
064bc8cb88
commit
27b1bbacb6
@ -22,7 +22,7 @@ def newton_raphson(
|
|||||||
2.718281828458938
|
2.718281828458938
|
||||||
>>> from scipy.optimize import newton
|
>>> from scipy.optimize import newton
|
||||||
>>> all(newton_raphson("log(x)- 1", 2) == newton("log(x)- 1", 2)
|
>>> 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
|
True
|
||||||
>>> newton_raphson("log(x)- 1", 2, 0)
|
>>> newton_raphson("log(x)- 1", 2, 0)
|
||||||
Traceback (most recent call last):
|
Traceback (most recent call last):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user