mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-02-25 10:28:39 +00:00
Update arithmetic_analysis/newton_raphson.py
Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
parent
4074513e9c
commit
588de45cf3
@ -33,7 +33,7 @@ def newton_raphson(func: str, a: float, precision: float = 10**-10) -> float:
|
||||
if abs(val) < precision:
|
||||
return float(x)
|
||||
|
||||
x = x - (val / diff_val)
|
||||
x -= val / diff_val
|
||||
|
||||
return float(x)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user