From 6f496bf93b47616559e5b55ce2963137f4248232 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sat, 23 Oct 2021 17:20:15 +0100 Subject: [PATCH 1/2] Correct test for cpp_dec_float division. --- test/quaternion_test.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/quaternion_test.cpp b/test/quaternion_test.cpp index 41af27e99..0d5320b6e 100644 --- a/test/quaternion_test.cpp +++ b/test/quaternion_test.cpp @@ -397,7 +397,11 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(arithmetic_test, T, test_types) // using /= (const T &) q4 /= f0; - check_exact_quaternion_result(q4, -T(868) / 7, T(420) / 7, T(490) / 7, T(560) / 7); + if(std::numeric_limits::radix == 2) + check_exact_quaternion_result(q4, -T(868) / 7, T(420) / 7, T(490) / 7, T(560) / 7); + else + // cpp_dec_float division is still inextact / not rounded: + check_approx_quaternion_result(q4, -T(868) / 7, T(420) / 7, T(490) / 7, T(560) / 7); q4 = q3; q4 /= boost::math::quaternion(9, 4, 6, 2); From 3c8cfa46d13310555c11e8ee166b8c87378ae792 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sat, 23 Oct 2021 19:44:47 +0100 Subject: [PATCH 2/2] Correct inspection report issue (missing newline). --- test/ccmath_remainder_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ccmath_remainder_test.cpp b/test/ccmath_remainder_test.cpp index ac5ebd981..65cef6cdd 100644 --- a/test/ccmath_remainder_test.cpp +++ b/test/ccmath_remainder_test.cpp @@ -82,4 +82,4 @@ int main() { return 0; } -#endif \ No newline at end of file +#endif