File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,18 @@ void test_div()
5858 BOOST_TEST (isnan (b / b));
5959}
6060
61+ // 7.2.f
62+ template <typename T>
63+ void test_remainder ()
64+ {
65+ const T a {dist (rng) * 0 };
66+ const T b {dist (rng) * std::numeric_limits<T>::infinity ()};
67+ const T c {dist (rng)};
68+
69+ BOOST_TEST (isnan (remainder (b, c)));
70+ BOOST_TEST (isnan (remainder (c, a)));
71+ }
72+
6173// 7.2.g
6274template <typename T>
6375void test_sqrt ()
@@ -90,6 +102,13 @@ int main()
90102 test_div<decimal_fast64_t >();
91103 test_div<decimal_fast128_t >();
92104
105+ test_remainder<decimal32_t >();
106+ test_remainder<decimal64_t >();
107+ test_remainder<decimal128_t >();
108+ test_remainder<decimal_fast32_t >();
109+ test_remainder<decimal_fast64_t >();
110+ test_remainder<decimal_fast128_t >();
111+
93112 test_sqrt<decimal32_t >();
94113 test_sqrt<decimal64_t >();
95114 test_sqrt<decimal128_t >();
You can’t perform that action at this time.
0 commit comments