mirror of
https://hub.njuu.cf/TheAlgorithms/Python.git
synced 2023-10-11 13:06:12 +08:00
commit
f33c3baa3d
@ -1,4 +1,4 @@
|
|||||||
# Implementing Newton Raphson method in python
|
# Implementing Newton Raphson method in Python
|
||||||
# Author: Haseeb
|
# Author: Haseeb
|
||||||
|
|
||||||
from sympy import diff
|
from sympy import diff
|
||||||
@ -20,7 +20,7 @@ def NewtonRaphson(func, a):
|
|||||||
|
|
||||||
# Let's Execute
|
# Let's Execute
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# Find root of trignometric fucntion
|
# Find root of trigonometric function
|
||||||
# Find value of pi
|
# Find value of pi
|
||||||
print ('sin(x) = 0', NewtonRaphson('sin(x)', 2))
|
print ('sin(x) = 0', NewtonRaphson('sin(x)', 2))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user