diff --git a/src/utils/ReproductibleSumUtils.hpp b/src/utils/ReproductibleSumUtils.hpp index bab97230ec500dd8a58eb2c0d5058ac1a1a80a59..e1f78a37fafc4522ffac80cec9047063dc3ddaf7 100644 --- a/src/utils/ReproductibleSumUtils.hpp +++ b/src/utils/ReproductibleSumUtils.hpp @@ -78,9 +78,9 @@ constexpr inline size_t bin_size<float> = 12; template <typename DataType> constexpr inline double bin_epsilon = 0; template <> -constexpr inline double bin_epsilon<double> = 1.11022302462516e-16; // std::pow(2., -53) +constexpr inline double bin_epsilon<double> = std::numeric_limits<double>::epsilon(); template <> -constexpr inline double bin_epsilon<float> = 5.96046447753906e-08; // std::pow(2., -24) +constexpr inline double bin_epsilon<float> = std::numeric_limits<float>::epsilon(); // number of bins: improves precision template <typename DataType> diff --git a/tests/test_ItemValueUtils.cpp b/tests/test_ItemValueUtils.cpp index b1901713a2065cb054dbb18debaa60722116cb7d..e9df51a05bc9b5a411a186ad742c2309c93ad9d4 100644 --- a/tests/test_ItemValueUtils.cpp +++ b/tests/test_ItemValueUtils.cpp @@ -242,7 +242,7 @@ TEST_CASE("ItemValueUtils", "[mesh]") std::array mesh_list = MeshDataBaseForTests::get().all1DMeshes(); for (const auto& named_mesh : mesh_list) { - SECTION(named_mesh.name() + "for size_t data") + SECTION(named_mesh.name() + " for size_t data") { auto mesh_1d = named_mesh.mesh(); @@ -269,7 +269,7 @@ TEST_CASE("ItemValueUtils", "[mesh]") REQUIRE(sum(cell_value) == global_sum); } - SECTION(named_mesh.name() + "for double data") + SECTION(named_mesh.name() + " for double data") { auto mesh_1d = named_mesh.mesh();