Skip to content

Commit

Permalink
Replace CoinAbs by std::abs
Browse files Browse the repository at this point in the history
  • Loading branch information
a-andre authored and svigerske committed Aug 16, 2024
1 parent 2181672 commit f7b0cce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/OsiCommonTest/OsiSimplexAPITest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -520,15 +520,15 @@ void testReducedGradient(const OsiSolverInterface *si)
break;
}
case OsiSimplex_isFree: {
OSIUNITTEST_ASSERT_ERROR(CoinAbs(testcbarj) <= dualTol,
OSIUNITTEST_ASSERT_ERROR(std::abs(testcbarj) <= dualTol,
if (OsiUnitTest::verbosity >= 1)
std::cout
<< " cbar<" << j << "> = " << cbarj << " should be zero for a NBFR variable." << std::endl,
solverName, "testReducedGradient");
break;
}
case OsiSimplex_basic: {
OSIUNITTEST_ASSERT_ERROR(CoinAbs(testcbarj) <= dualTol,
OSIUNITTEST_ASSERT_ERROR(std::abs(testcbarj) <= dualTol,
if (OsiUnitTest::verbosity >= 1)
std::cout
<< " cbar<" << j << "> = " << cbarj << " should be zero for a basic variable." << std::endl,
Expand Down
4 changes: 2 additions & 2 deletions src/OsiCommonTest/OsiSolverInterfaceTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2427,7 +2427,7 @@ void testReducedCosts(const OsiSolverInterface *emptySi,
break;
}
case CoinWarmStartBasis::isFree: {
if (CoinAbs(testcbarj) > dualTol) {
if (std::abs(testcbarj) > dualTol) {
testcbarj_ok = false;
if (OsiUnitTest::verbosity >= 1) {
std::cout
Expand All @@ -2439,7 +2439,7 @@ void testReducedCosts(const OsiSolverInterface *emptySi,
break;
}
case CoinWarmStartBasis::basic: {
if (CoinAbs(testcbarj) > dualTol) {
if (std::abs(testcbarj) > dualTol) {
testcbarj_ok = false;
if (OsiUnitTest::verbosity >= 1) {
std::cout
Expand Down

0 comments on commit f7b0cce

Please sign in to comment.