From a67321c8d2905d74c6969a31f959eb7422c2fdeb Mon Sep 17 00:00:00 2001 From: Nick Thompson Date: Mon, 9 Mar 2020 20:19:36 -0400 Subject: [PATCH] Fix build errors. --- .../math/special_functions/daubechies_scaling.hpp | 4 ++-- test/daubechies_scaling_test.cpp | 12 ++++++------ test/quintic_hermite_test.cpp | 2 ++ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/include/boost/math/special_functions/daubechies_scaling.hpp b/include/boost/math/special_functions/daubechies_scaling.hpp index b18828d44..96147e20f 100644 --- a/include/boost/math/special_functions/daubechies_scaling.hpp +++ b/include/boost/math/special_functions/daubechies_scaling.hpp @@ -45,7 +45,7 @@ std::vector dyadic_grid(int64_t j_max) for (int64_t j = 1; j <= j_max; ++j) { - int64_t k_max = v.size()/(1 << (j_max-j)); + int64_t k_max = v.size()/(int64_t(1) << (j_max-j)); for (int64_t k = 1; k < k_max; k += 2) { // Where this value will go: @@ -58,7 +58,7 @@ std::vector dyadic_grid(int64_t j_max) Real term = 0; for (int64_t l = 0; l < (int64_t) c.size(); ++l) { - int64_t idx = k*(1 << (j_max - j + 1)) - l*(1 << j_max); + int64_t idx = k*(int64_t(1) << (j_max - j + 1)) - l*(int64_t(1) << j_max); if (idx < 0) { break; diff --git a/test/daubechies_scaling_test.cpp b/test/daubechies_scaling_test.cpp index f2795c9f9..532eccdc4 100644 --- a/test/daubechies_scaling_test.cpp +++ b/test/daubechies_scaling_test.cpp @@ -257,11 +257,11 @@ void test_dyadic_grid() for (size_t j = 1; j < 10; ++j) { - auto phijk = boost::math::dyadic_grid(j); - auto phik = boost::math::detail::daubechies_scaling_integer_grid(); - for (size_t i = 0; i < phik.size(); ++i) + phijk = boost::math::dyadic_grid(j); + phik = boost::math::detail::daubechies_scaling_integer_grid(); + for (size_t l = 0; l < phik.size(); ++l) { - CHECK_ULP_CLOSE(phik[i], phijk[i*(1<(0); - for (size_t i = 0; i < phik.size(); ++i) + for (size_t l = 0; l < phik.size(); ++l) { - size_t idx = i*(1< #include +#include +#include #include #include #include