Skip to content

Commit

Permalink
Fix incorrect use of abs() function
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisvr committed Dec 5, 2024
1 parent 1396109 commit 69f3f34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/weighted_matching_test2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ void test_matching(const Graph& g, WeightType answer)
{
WeightType eps = std::numeric_limits<WeightType>::epsilon();
WeightType max_error = std::max(eps, answer * eps);
same_answer = (abs(weight - answer) <= max_error);
same_answer = (std::abs(weight - answer) <= max_error);
}

BOOST_TEST(same_answer);
Expand Down

0 comments on commit 69f3f34

Please sign in to comment.