more relaxed floating point test

This commit is contained in:
Laurent Perron
2025-03-24 16:21:33 -07:00
parent 60b5457b47
commit 7669691031

View File

@@ -867,7 +867,7 @@ TEST(BasicKnapsackSolverTest, RandomComparisonWithSolver) {
<< domains[i] << " " << result.solution[i] << " " << coeffs[i];
objective += costs[i] * result.solution[i];
}
EXPECT_DOUBLE_EQ(objective, response.objective_value());
EXPECT_NEAR(objective, response.objective_value(), 1e-8);
}
}
}