@@ -40,23 +40,41 @@ constexpr void test()
4040 static_assert (boost::math::ccmath::lround (std::numeric_limits<T>::infinity ()) == 0l );
4141 static_assert (boost::math::ccmath::llround (std::numeric_limits<T>::infinity ()) == 0ll );
4242
43+ static_assert (boost::math::ccmath::round (T (0.1 )) == T (0 ));
44+ static_assert (boost::math::ccmath::round (T (0.5 )) == T (1 ));
45+ static_assert (boost::math::ccmath::round (T (0.9 )) == T (1 ));
4346 static_assert (boost::math::ccmath::round (T (2.3 )) == T (2 ));
4447 static_assert (boost::math::ccmath::round (T (2.5 )) == T (3 ));
4548 static_assert (boost::math::ccmath::round (T (2.7 )) == T (3 ));
49+ static_assert (boost::math::ccmath::round (T (-0.1 )) == T (0 ));
50+ static_assert (boost::math::ccmath::round (T (-0.5 )) == T (-1 ));
51+ static_assert (boost::math::ccmath::round (T (-0.9 )) == T (-1 ));
4652 static_assert (boost::math::ccmath::round (T (-2.3 )) == T (-2 ));
4753 static_assert (boost::math::ccmath::round (T (-2.5 )) == T (-3 ));
4854 static_assert (boost::math::ccmath::round (T (-2.7 )) == T (-3 ));
4955
56+ static_assert (boost::math::ccmath::lround (T (0.1 )) == 0l );
57+ static_assert (boost::math::ccmath::lround (T (0.5 )) == 1l );
58+ static_assert (boost::math::ccmath::lround (T (0.9 )) == 1l );
5059 static_assert (boost::math::ccmath::lround (T (2.3 )) == 2l );
5160 static_assert (boost::math::ccmath::lround (T (2.5 )) == 3l );
5261 static_assert (boost::math::ccmath::lround (T (2.7 )) == 3l );
62+ static_assert (boost::math::ccmath::lround (T (-0.1 )) == 0l );
63+ static_assert (boost::math::ccmath::lround (T (-0.5 )) == -1l );
64+ static_assert (boost::math::ccmath::lround (T (-0.9 )) == -1l );
5365 static_assert (boost::math::ccmath::lround (T (-2.3 )) == -2l );
5466 static_assert (boost::math::ccmath::lround (T (-2.5 )) == -3l );
5567 static_assert (boost::math::ccmath::lround (T (-2.7 )) == -3l );
5668
69+ static_assert (boost::math::ccmath::llround (T (0.1 )) == 0ll );
70+ static_assert (boost::math::ccmath::llround (T (0.5 )) == 1ll );
71+ static_assert (boost::math::ccmath::llround (T (0.9 )) == 1ll );
5772 static_assert (boost::math::ccmath::llround (T (2.3 )) == 2ll );
5873 static_assert (boost::math::ccmath::llround (T (2.5 )) == 3ll );
5974 static_assert (boost::math::ccmath::llround (T (2.7 )) == 3ll );
75+ static_assert (boost::math::ccmath::llround (T (-0.1 )) == 0ll );
76+ static_assert (boost::math::ccmath::llround (T (-0.5 )) == -1ll );
77+ static_assert (boost::math::ccmath::llround (T (-0.9 )) == -1ll );
6078 static_assert (boost::math::ccmath::llround (T (-2.3 )) == -2ll );
6179 static_assert (boost::math::ccmath::llround (T (-2.5 )) == -3ll );
6280 static_assert (boost::math::ccmath::llround (T (-2.7 )) == -3ll );
0 commit comments