|
|
a08fcbc |
From 15f50c71b4d89bfbf06ce817dee38e843f0f55cd Mon Sep 17 00:00:00 2001
|
|
|
530bdfb |
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
|
|
a08fcbc |
Date: Mon, 17 Jan 2022 23:50:47 +0100
|
|
|
530bdfb |
Subject: [PATCH] Fix test failure on ppc64le and aarch64 with gcc 12
|
|
|
530bdfb |
|
|
|
530bdfb |
.../hist/hist/test/test_tprofile2poly.cxx:61: Failure
|
|
|
530bdfb |
The difference between cont1 and cont2 is 1.4551915228366852e-11, which exceeds delta, where
|
|
|
530bdfb |
cont1 evaluates to 54886.064319363642,
|
|
|
530bdfb |
cont2 evaluates to 54886.064319363628, and
|
|
|
530bdfb |
delta evaluates to 9.999999960041972e-12.
|
|
|
530bdfb |
.../hist/hist/test/test_tprofile2poly.cxx:61: Failure
|
|
|
530bdfb |
The difference between cont1 and cont2 is 1.4551915228366852e-11, where
|
|
|
530bdfb |
cont1 evaluates to 109868.61342004745,
|
|
|
530bdfb |
cont2 evaluates to 109868.61342004743.
|
|
|
530bdfb |
The abs_error parameter delta evaluates to 9.999999960041972e-12 which is smaller than the minimum distance between doubles for numbers of this magnitude which is 1.4551915228366852e-11, thus making this EXPECT_NEAR check equivalent to EXPECT_EQUAL. Consider using EXPECT_DOUBLE_EQ instead.
|
|
|
530bdfb |
---
|
|
|
a08fcbc |
hist/hist/test/test_tprofile2poly.cxx | 5 ++---
|
|
|
a08fcbc |
1 file changed, 2 insertions(+), 3 deletions(-)
|
|
|
530bdfb |
|
|
|
530bdfb |
diff --git a/hist/hist/test/test_tprofile2poly.cxx b/hist/hist/test/test_tprofile2poly.cxx
|
|
|
a08fcbc |
index 40cb3052a2..ecf559a4b3 100644
|
|
|
530bdfb |
--- a/hist/hist/test/test_tprofile2poly.cxx
|
|
|
530bdfb |
+++ b/hist/hist/test/test_tprofile2poly.cxx
|
|
|
a08fcbc |
@@ -58,15 +58,14 @@ void binEntriesCompare(TProfile2D* tp2d, TProfile2Poly* tpp) {
|
|
|
530bdfb |
for(Double_t x=0.5; x<10; x+=2.0) {
|
|
|
530bdfb |
cont1 = tp2d->GetBinEffectiveEntries(tp2d->FindBin(x,y));
|
|
|
530bdfb |
cont2 = tpp->GetBinEffectiveEntries(tpp->FindBin(x,y));
|
|
|
530bdfb |
- ASSERT_NEAR(cont1, cont2, delta);
|
|
|
a08fcbc |
+ ASSERT_NEAR(cont1, cont2, 2 * delta);
|
|
|
530bdfb |
}
|
|
|
530bdfb |
|
|
|
530bdfb |
}
|
|
|
530bdfb |
// test overflow
|
|
|
530bdfb |
cont1 = tp2d->GetBinEffectiveEntries(tp2d->FindBin(11,11));
|
|
|
530bdfb |
cont2 = tpp->GetBinEffectiveEntries(tpp->FindBin(11,11));
|
|
|
530bdfb |
- ASSERT_NEAR(cont1, cont2, delta);
|
|
|
a08fcbc |
-
|
|
|
a08fcbc |
+ ASSERT_NEAR(cont1, cont2, 2 * delta);
|
|
|
530bdfb |
}
|
|
|
530bdfb |
|
|
|
a08fcbc |
void binErrorCompare(TProfile2D* tp2d, TProfile2Poly* tpp) {
|
|
|
530bdfb |
--
|
|
|
a08fcbc |
2.39.2
|
|
|
530bdfb |
|