From 7618aed362670bc62ec51ec699ab57eef4dcecbe Mon Sep 17 00:00:00 2001 From: Sarah Kinney Date: Thu, 28 Aug 2025 15:25:28 -0600 Subject: [PATCH] Added parenthesis to denominators in quadtratic formula to fix incorrect division. --- utils/quadroots.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/quadroots.py b/utils/quadroots.py index 460f2b1..4cb77ed 100644 --- a/utils/quadroots.py +++ b/utils/quadroots.py @@ -21,7 +21,7 @@ def quadroots(a, b, c): Roots of the equation. """ - x1 = (-b + np.sqrt(b**2 - 4*a*c))/2*a - x2 = (-b - np.sqrt(b**2 - 4*a*c))/2*a + x1 = (-b + np.sqrt(b**2 - 4*a*c))/(2*a) + x2 = (-b - np.sqrt(b**2 - 4*a*c))/(2*a) return (x1, x2)