diff --git a/test/wavelet_transform_test.cpp b/test/wavelet_transform_test.cpp index 7a0fa1648..c49090957 100644 --- a/test/wavelet_transform_test.cpp +++ b/test/wavelet_transform_test.cpp @@ -19,6 +19,10 @@ #include #include +#if __has_include() +# include +#endif + #ifdef BOOST_HAS_FLOAT128 #include using boost::multiprecision::float128; @@ -118,7 +122,7 @@ void test_wavelet_transform() for (double t = -10; t < 10; t+= 0.1) { Real w = Wg(s, t); - if (!CHECK_LE(abs(w), 10*sqrt(std::numeric_limits::epsilon()))) + if (!CHECK_LE(abs(w), Real(10*sqrt(std::numeric_limits::epsilon())))) { std::cerr << " Wavelet transform of constant with respect to " << p << " vanishing moment Daubechies wavelet is insufficiently small\n"; } @@ -127,7 +131,7 @@ void test_wavelet_transform() } // Wavelet transform of psi evaluated at s = 1, t = 0 is L2 norm of psi: auto Wpsi = daubechies_wavelet_transform(psi, psi); - CHECK_MOLLIFIED_CLOSE(Real(1), Wpsi(1,0), 2*sqrt(std::numeric_limits::epsilon())); + CHECK_MOLLIFIED_CLOSE(Real(1), Wpsi(1,0), Real(2*sqrt(std::numeric_limits::epsilon()))); } } @@ -135,9 +139,15 @@ void test_wavelet_transform() int main() { try{ + #ifdef __STDCPP_FLOAT64_T__ + test_wavelet_transform(); + test_wavelet_transform(); + test_wavelet_transform(); + #else test_wavelet_transform(); test_wavelet_transform(); test_wavelet_transform(); + #endif // All these tests pass, but the compilation takes too long on CI: //boost::hana::for_each(std::make_index_sequence<17>(), [&](auto i) { // test_wavelet_transform();