From 588de45cf3bc95245966efa10a51e6b6b5c8a8f2 Mon Sep 17 00:00:00 2001 From: Rohan Anand <96521078+rohan472000@users.noreply.github.com> Date: Sun, 16 Jul 2023 12:52:15 +0530 Subject: [PATCH] Update arithmetic_analysis/newton_raphson.py Co-authored-by: Christian Clauss --- arithmetic_analysis/newton_raphson.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arithmetic_analysis/newton_raphson.py b/arithmetic_analysis/newton_raphson.py index b3fcd6c41..4ffdb432c 100644 --- a/arithmetic_analysis/newton_raphson.py +++ b/arithmetic_analysis/newton_raphson.py @@ -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)