Skip to content

Commit

Permalink
Increase tols for some updated MSVC runners
Browse files Browse the repository at this point in the history
  • Loading branch information
ckormanyos committed Dec 19, 2024
1 parent dbc9e72 commit 0308556
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions test/cubic_roots_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,16 @@ template <class Real> void test_zero_coefficients() {

auto roots = cubic_roots(a, b, c, d);
// I could check the condition number here, but this is fine right?
if (!CHECK_ULP_CLOSE(r[0], roots[0], (std::numeric_limits<Real>::digits > 100 ? 120 : 25))) {
if (!CHECK_ULP_CLOSE(r[0], roots[0], (std::numeric_limits<Real>::digits > 100 ? 120 : 60))) {
std::cerr << " Polynomial x^3 + " << b << "x^2 + " << c << "x + "
<< d << " has roots {";
std::cerr << r[0] << ", " << r[1] << ", " << r[2]
<< "}, but the computed roots are {";
std::cerr << roots[0] << ", " << roots[1] << ", " << roots[2]
<< "}\n";
}
CHECK_ULP_CLOSE(r[1], roots[1], 25);
CHECK_ULP_CLOSE(r[2], roots[2], (std::numeric_limits<Real>::digits > 100 ? 120 : 25));
CHECK_ULP_CLOSE(r[1], roots[1], 80);
CHECK_ULP_CLOSE(r[2], roots[2], (std::numeric_limits<Real>::digits > 100 ? 120 : 80));
for (auto root : roots) {
auto res = cubic_root_residual(a, b, c, d, root);
CHECK_LE(abs(res[0]), res[1]);
Expand Down
4 changes: 2 additions & 2 deletions test/linear_regression_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ void test_scaling_relations()
Real c1_lambda = std::get<1>(temp);
Real Rsquared_lambda = std::get<2>(temp);

CHECK_ULP_CLOSE(lambda*c0, c0_lambda, 50);
CHECK_ULP_CLOSE(lambda*c0, c0_lambda, 70);
CHECK_ULP_CLOSE(lambda*c1, c1_lambda, 30);
CHECK_ULP_CLOSE(Rsquared, Rsquared_lambda, 3);

Expand All @@ -241,7 +241,7 @@ void test_scaling_relations()
Real c1_ = std::get<1>(temp);
Real Rsquared_ = std::get<2>(temp);

CHECK_ULP_CLOSE(c0, c0_, 70);
CHECK_ULP_CLOSE(c0, c0_, 100);
CHECK_ULP_CLOSE(c1, c1_*lambda, 50);
CHECK_ULP_CLOSE(Rsquared, Rsquared_, 50);

Expand Down
4 changes: 2 additions & 2 deletions test/quartic_roots_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ void test_zero_coefficients()

roots = quartic_roots(a, b, c, d, e);
// I could check the condition number here, but this is fine right?
CHECK_ULP_CLOSE(r[0], roots[0], 160);
CHECK_ULP_CLOSE(r[1], roots[1], 260);
CHECK_ULP_CLOSE(r[0], roots[0], 340);
CHECK_ULP_CLOSE(r[1], roots[1], 440);
CHECK_ULP_CLOSE(r[2], roots[2], 220);
CHECK_ULP_CLOSE(r[3], roots[3], 160);
}
Expand Down

0 comments on commit 0308556

Please sign in to comment.