Skip to content

Commit 066f374

Browse files
guij15AnupKumarPanwar
authored andcommitted
Update newton_raphson.py (TheAlgorithms#891)
1 parent 9b945cb commit 066f374

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

maths/newton_raphson.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def newton_raphson(f, x0=0, maxiter=100, step=0.0001, maxerror=1e-6,logsteps=Fal
3333
if error < maxerror:
3434
break
3535
else:
36-
raise ValueError("Itheration limit reached, no converging solution found")
36+
raise ValueError("Iteration limit reached, no converging solution found")
3737
if logsteps:
3838
#If logstep is true, then log intermediate steps
3939
return a, error, steps
@@ -47,4 +47,4 @@ def newton_raphson(f, x0=0, maxiter=100, step=0.0001, maxerror=1e-6,logsteps=Fal
4747
plt.xlabel("step")
4848
plt.ylabel("error")
4949
plt.show()
50-
print("solution = {%f}, error = {%f}" % (solution, error))
50+
print("solution = {%f}, error = {%f}" % (solution, error))

0 commit comments

Comments
 (0)