From d1101432c443e351870548bf528dcb875856e340 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Mon, 12 May 2025 16:28:27 +0100 Subject: [PATCH] Coverage: zeta and ulp tweaks for full coverage. --- include/boost/math/special_functions/zeta.hpp | 2 +- test/test_ulp.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/boost/math/special_functions/zeta.hpp b/include/boost/math/special_functions/zeta.hpp index c10307542..4a374cdd5 100644 --- a/include/boost/math/special_functions/zeta.hpp +++ b/include/boost/math/special_functions/zeta.hpp @@ -949,7 +949,7 @@ T zeta_imp(T s, T sc, const Policy& pol, const Tag& tag) static const char* function = "boost::math::zeta<%1%>"; if(sc == 0) return policies::raise_pole_error(function, "Evaluation of zeta function at pole %1%", s, pol); - T result; + T result; // LCOV_EXCL_LINE // // Trivial case: // diff --git a/test/test_ulp.cpp b/test/test_ulp.cpp index fe0336469..f57ea2061 100644 --- a/test/test_ulp.cpp +++ b/test/test_ulp.cpp @@ -26,6 +26,8 @@ void test() BOOST_CHECK_THROW(boost::math::ulp(std::numeric_limits::infinity()), std::overflow_error); } BOOST_CHECK_THROW(boost::math::ulp(boost::math::tools::max_value()), std::overflow_error); + + BOOST_CHECK(boost::math::ulp(static_cast(0)) != 0); } BOOST_AUTO_TEST_CASE( test_main )