From 738012355df9316e6fd716f2b904d8f46c1fea5b Mon Sep 17 00:00:00 2001 From: Nils Wentzell Date: Thu, 30 Sep 2021 17:49:50 -0400 Subject: [PATCH] [stat] Slightly raise test comparison accuracy for compatibility with IntelLLVM compiler --- test/c++/stat/autocorr.cpp | 8 ++++---- test/c++/stat/jackknife.cpp | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/test/c++/stat/autocorr.cpp b/test/c++/stat/autocorr.cpp index e2204e8302..0da15d8d74 100644 --- a/test/c++/stat/autocorr.cpp +++ b/test/c++/stat/autocorr.cpp @@ -213,10 +213,10 @@ TEST(Stat, LogBinArray) { auto [errors_b, counts_b] = b.log_bin_errors(); for (auto [x1, x2, a] : itertools::zip(errors_b1, errors_b2, errors_b)) { - EXPECT_NEAR(x1, a(0, 0), 1.e-15); - EXPECT_NEAR(x2, a(0, 1), 1.e-15); - EXPECT_NEAR(x1, a(1, 1), 1.e-15); - EXPECT_NEAR(x2, a(1, 0), 1.e-15); + EXPECT_NEAR(x1, a(0, 0), 1.e-14); + EXPECT_NEAR(x2, a(0, 1), 1.e-14); + EXPECT_NEAR(x1, a(1, 1), 1.e-14); + EXPECT_NEAR(x2, a(1, 0), 1.e-14); } auto [errors_bb, counts_bb] = b.log_bin_errors(); diff --git a/test/c++/stat/jackknife.cpp b/test/c++/stat/jackknife.cpp index cabc2419c2..775e327643 100644 --- a/test/c++/stat/jackknife.cpp +++ b/test/c++/stat/jackknife.cpp @@ -165,12 +165,12 @@ TEST(Binned, array) { //std::cerr << xn << std::endl; //std::cerr << xd << std::endl; - EXPECT_NEAR(x1, x(0, 0), 1.e-15); - EXPECT_NEAR(x2, x(0, 1), 1.e-15); - EXPECT_NEAR(xn1, xn(0, 0), 1.e-15); - EXPECT_NEAR(xn2, xn(0, 1), 1.e-15); - EXPECT_NEAR(d1, xd(0, 0), 1.e-15); - EXPECT_NEAR(d2, xd(1, 0), 1.e-15); + EXPECT_NEAR(x1, x(0, 0), 1.e-13); + EXPECT_NEAR(x2, x(0, 1), 1.e-13); + EXPECT_NEAR(xn1, xn(0, 0), 1.e-13); + EXPECT_NEAR(xn2, xn(0, 1), 1.e-13); + EXPECT_NEAR(d1, xd(0, 0), 1.e-13); + EXPECT_NEAR(d2, xd(1, 0), 1.e-13); } /*