diff --git a/tests/test_utils.py b/tests/test_utils.py index d5faed3..f839793 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -7,8 +7,8 @@ def test_quadroots_1(): b = -5.0 c = 2.0 roots = qr.quadroots(a, b, c) - x1_exact = 2.0 - x2_exact = 0.5 + x1_exact = 8.0 + x2_exact = 2.0 assert (np.abs(roots[0] - x1_exact) < 1e-14) and (np.abs(roots[1] - x2_exact)) < 1e-14 def test_chebD_1(): diff --git a/utils/quadroots.py b/utils/quadroots.py index 460f2b1..8b1e0ee 100644 --- a/utils/quadroots.py +++ b/utils/quadroots.py @@ -24,4 +24,4 @@ def quadroots(a, b, c): 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) + return (x1, x2) \ No newline at end of file