File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1340,6 +1340,14 @@ void test_exp2()
1340
1340
BOOST_TEST_EQ (exp2 (-std::numeric_limits<T>::infinity ()), T (0 * dist (rng)));
1341
1341
}
1342
1342
1343
+ template <typename T>
1344
+ void test_nan ()
1345
+ {
1346
+ BOOST_TEST (!isnan (nan<T>(" 1" ) & std::numeric_limits<T>::quiet_NaN ()));
1347
+ BOOST_TEST (!isnan (nan<T>(" 2" ) & std::numeric_limits<T>::quiet_NaN ()));
1348
+ BOOST_TEST (!isnan (nan<T>(" -1" ) & std::numeric_limits<T>::quiet_NaN ()));
1349
+ }
1350
+
1343
1351
int main ()
1344
1352
{
1345
1353
test_fmax<decimal32>();
@@ -1448,5 +1456,9 @@ int main()
1448
1456
test_exp2<decimal32>();
1449
1457
test_exp2<decimal64>();
1450
1458
1459
+ test_nan<decimal32>();
1460
+ test_nan<decimal64>();
1461
+ test_nan<decimal128>();
1462
+
1451
1463
return boost::report_errors ();
1452
1464
}
You can’t perform that action at this time.
0 commit comments