Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions maths/newton_raphson.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def newton_raphson(f, x0=0, maxiter=100, step=0.0001, maxerror=1e-6,logsteps=Fal
if error < maxerror:
break
else:
raise ValueError("Itheration limit reached, no converging solution found")
raise ValueError("Iteration limit reached, no converging solution found")
if logsteps:
#If logstep is true, then log intermediate steps
return a, error, steps
Expand All @@ -47,4 +47,4 @@ def newton_raphson(f, x0=0, maxiter=100, step=0.0001, maxerror=1e-6,logsteps=Fal
plt.xlabel("step")
plt.ylabel("error")
plt.show()
print("solution = {%f}, error = {%f}" % (solution, error))
print("solution = {%f}, error = {%f}" % (solution, error))