Skip to content

Commit 066f374

Browse files
guij15AnupKumarPanwar
authored andcommitted
Update newton_raphson.py (#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

Lines changed: 2 additions & 2 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy