From ef957bae98dde4bed07186c72ab75083db53763f Mon Sep 17 00:00:00 2001 From: Krishna Vedala <7001608+kvedala@users.noreply.github.com> Date: Sun, 21 Jun 2020 23:08:53 -0400 Subject: [PATCH] removed scaling during assert checks --- numerical_methods/brent_method_extrema.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/numerical_methods/brent_method_extrema.cpp b/numerical_methods/brent_method_extrema.cpp index 10b53b882..654a69451 100644 --- a/numerical_methods/brent_method_extrema.cpp +++ b/numerical_methods/brent_method_extrema.cpp @@ -152,7 +152,7 @@ void test1() { std::cout << minima << "..."; - assert(std::abs(minima - 2) < EPSILON * 2); + assert(std::abs(minima - 2) < EPSILON); std::cout << "passed\n"; } @@ -175,7 +175,7 @@ void test2() { std::cout << minima << " (" << M_E << ")..."; - assert(std::abs(minima - M_E) < EPSILON * 2); + assert(std::abs(minima - M_E) < EPSILON); std::cout << "passed\n"; } @@ -196,7 +196,7 @@ void test3() { std::cout << minima << " (" << M_PI << ")..."; - assert(std::abs(minima - M_PI) < EPSILON * 2); + assert(std::abs(minima - M_PI) < EPSILON); std::cout << "passed\n"; }