diff --git a/Framework/HistogramData/test/RebinTest.h b/Framework/HistogramData/test/RebinTest.h index 5b1d8df8e91f9fdb078fd168bede7be1bd5777e3..e3b4a7d78424ca94576a2e9dbf2c179e54be22ff 100644 --- a/Framework/HistogramData/test/RebinTest.h +++ b/Framework/HistogramData/test/RebinTest.h @@ -149,10 +149,10 @@ public: for (size_t i = 0; i < outCounts.y().size(); i++) { TS_ASSERT_EQUALS(outCounts.y()[i], hist.y()[2 * i] + hist.y()[(2 * i) + 1]); - TS_ASSERT_DELTA(outCounts.e()[i], std::sqrt(outCounts.y()[i]), 1e-5); + TS_ASSERT_DELTA(outCounts.e()[i], std::sqrt(outCounts.y()[i]), 1e-14); TS_ASSERT_EQUALS(outFreq.y()[i], (histFreq.y()[2 * i] + histFreq.y()[(2 * i) + 1]) / 2); - TS_ASSERT_DELTA(outFreq.e()[i], std::sqrt(outFreq.y()[i] / 2), 1e-5); + TS_ASSERT_DELTA(outFreq.e()[i], std::sqrt(outFreq.y()[i] / 2), 1e-14); } } @@ -176,10 +176,10 @@ public: TS_ASSERT_EQUALS(outFreq.y()[2], histFreq.y()[1]); for (size_t i = 0; i < outCounts.y().size(); i++) { - TS_ASSERT_DELTA(outCounts.e()[i], std::sqrt(outCounts.y()[i]), 1e-5); + TS_ASSERT_DELTA(outCounts.e()[i], std::sqrt(outCounts.y()[i]), 1e-14); TS_ASSERT_DELTA(outFreq.e()[i], std::sqrt(outFreq.y()[i] / (edges[i + 1] - edges[i])), - 1e-5); + 1e-14); } } @@ -200,15 +200,15 @@ public: TS_ASSERT_EQUALS(outFreq.y()[0], (histFreq.y()[0] + histFreq.y()[1]) / 2); TS_ASSERT_EQUALS(outFreq.y()[1], (histFreq.y()[1] + histFreq.y()[2]) / 2); - TS_ASSERT_DELTA(outCounts.e()[0], std::sqrt(outCounts.y()[0]), 1e-5); - TS_ASSERT_DELTA(outCounts.e()[1], std::sqrt(outCounts.y()[1]), 1e-5); + TS_ASSERT_DELTA(outCounts.e()[0], std::sqrt(outCounts.y()[0]), 1e-14); + TS_ASSERT_DELTA(outCounts.e()[1], std::sqrt(outCounts.y()[1]), 1e-14); TS_ASSERT_DELTA(outFreq.e()[0], std::sqrt(((histFreq.y()[0] / 2) + histFreq.y()[1]) / 2), - 1e-5); + 1e-14); TS_ASSERT_DELTA(outFreq.e()[1], std::sqrt(((histFreq.y()[2] / 2) + histFreq.y()[1]) / 2), - 1e-5); + 1e-14); } void testSplitCombineBinsAsymmetric() { @@ -234,10 +234,10 @@ public: TS_ASSERT_EQUALS(outFreq.y()[2], histFreq.y()[2]); for (size_t i = 0; i < outCounts.y().size(); i++) { - TS_ASSERT_DELTA(outCounts.e()[i], std::sqrt(outCounts.y()[i]), 1e-5); + TS_ASSERT_DELTA(outCounts.e()[i], std::sqrt(outCounts.y()[i]), 1e-14); TS_ASSERT_DELTA(outFreq.e()[i], std::sqrt(outFreq.y()[i] / (edges[i + 1] - edges[i])), - 1e-5); + 1e-14); } } @@ -260,17 +260,17 @@ public: TS_ASSERT_EQUALS(outFreq.y()[1], histFreq.y()[1]); TS_ASSERT_EQUALS(outFreq.y()[2], (histFreq.y()[1] + histFreq.y()[2]) / 2); - TS_ASSERT_DELTA(outCounts.e()[0], std::sqrt(outCounts.y()[0]), 1e-5); - TS_ASSERT_DELTA(outCounts.e()[1], std::sqrt(outCounts.y()[1]), 1e-5); - TS_ASSERT_DELTA(outCounts.e()[2], std::sqrt(outCounts.y()[2]), 1e-5); + TS_ASSERT_DELTA(outCounts.e()[0], std::sqrt(outCounts.y()[0]), 1e-14); + TS_ASSERT_DELTA(outCounts.e()[1], std::sqrt(outCounts.y()[1]), 1e-14); + TS_ASSERT_DELTA(outCounts.e()[2], std::sqrt(outCounts.y()[2]), 1e-14); TS_ASSERT_DELTA( outFreq.e()[0], - std::sqrt(((histFreq.y()[0] / 2) + (histFreq.y()[1] * 2)) / 2), 1e-5); - TS_ASSERT_DELTA(outFreq.e()[1], std::sqrt(histFreq.y()[1] * 2), 1e-5); + std::sqrt(((histFreq.y()[0] / 2) + (histFreq.y()[1] * 2)) / 2), 1e-14); + TS_ASSERT_DELTA(outFreq.e()[1], std::sqrt(histFreq.y()[1] * 2), 1e-14); TS_ASSERT_DELTA( outFreq.e()[2], - std::sqrt(((histFreq.y()[2] / 2) + (histFreq.y()[1] * 2)) / 2), 1e-5); + std::sqrt(((histFreq.y()[2] / 2) + (histFreq.y()[1] * 2)) / 2), 1e-14); } void testSmallerBinsAsymmetric() { @@ -291,8 +291,8 @@ public: TS_ASSERT_EQUALS(outFreq.y()[1], (histFreq.y()[1] + histFreq.y()[2]) / 2); for (size_t i = 0; i < outCounts.y().size(); i++) { - TS_ASSERT_DELTA(outCounts.e()[i], std::sqrt(outCounts.y()[i]), 1e-5); - TS_ASSERT_DELTA(outFreq.e()[i], std::sqrt(outFreq.y()[i]), 1e-5); + TS_ASSERT_DELTA(outCounts.e()[i], std::sqrt(outCounts.y()[i]), 1e-14); + TS_ASSERT_DELTA(outFreq.e()[i], std::sqrt(outFreq.y()[i]), 1e-14); } } @@ -315,13 +315,13 @@ public: TS_ASSERT_EQUALS(outFreq.y()[1], (histFreq.y()[0] + histFreq.y()[1]) / 2); TS_ASSERT_EQUALS(outFreq.y()[2], histFreq.y()[1] / 2); - TS_ASSERT_DELTA(outCounts.e()[0], std::sqrt(outCounts.y()[0]), 1e-5); - TS_ASSERT_DELTA(outCounts.e()[1], std::sqrt(outCounts.y()[1]), 1e-5); - TS_ASSERT_DELTA(outCounts.e()[2], std::sqrt(outCounts.y()[2]), 1e-5); + TS_ASSERT_DELTA(outCounts.e()[0], std::sqrt(outCounts.y()[0]), 1e-14); + TS_ASSERT_DELTA(outCounts.e()[1], std::sqrt(outCounts.y()[1]), 1e-14); + TS_ASSERT_DELTA(outCounts.e()[2], std::sqrt(outCounts.y()[2]), 1e-14); - TS_ASSERT_DELTA(outFreq.e()[0], std::sqrt(outFreq.y()[0]), 1e-5); - TS_ASSERT_DELTA(outFreq.e()[1], std::sqrt(outFreq.y()[1]), 1e-5); - TS_ASSERT_DELTA(outFreq.e()[2], outFreq.y()[2], 1e-5); + TS_ASSERT_DELTA(outFreq.e()[0], std::sqrt(outFreq.y()[0]), 1e-14); + TS_ASSERT_DELTA(outFreq.e()[1], std::sqrt(outFreq.y()[1]), 1e-14); + TS_ASSERT_DELTA(outFreq.e()[2], outFreq.y()[2], 1e-14); } void testSmallerBinsSymmetric() { @@ -358,7 +358,7 @@ public: TS_ASSERT_EQUALS(outCounts.y()[2], 0); TS_ASSERT_EQUALS(outCounts.e()[0], 0); - TS_ASSERT_DELTA(outCounts.e()[1], std::sqrt(outCounts.y()[1]), 1e-5); + TS_ASSERT_DELTA(outCounts.e()[1], std::sqrt(outCounts.y()[1]), 1e-14); TS_ASSERT_EQUALS(outCounts.e()[2], 0); TS_ASSERT_EQUALS(outFreq.y()[0], 0); @@ -366,7 +366,7 @@ public: TS_ASSERT_EQUALS(outFreq.y()[2], 0); TS_ASSERT_EQUALS(outFreq.e()[0], 0); - TS_ASSERT_DELTA(outFreq.e()[1], std::sqrt(outFreq.y()[1]), 1e-5); + TS_ASSERT_DELTA(outFreq.e()[1], std::sqrt(outFreq.y()[1]), 1e-14); TS_ASSERT_EQUALS(outFreq.e()[2], 0); }