15 int rows = internal::random<int>(1,300);
16 int cols = internal::random<int>(1,300);
18 Scalar nan = std::numeric_limits<Scalar>::quiet_NaN();
19 Scalar inf = std::numeric_limits<Scalar>::infinity();
20 Scalar s1 = internal::random<Scalar>();
22 MatType
m1 = MatType::Random(rows,cols),
23 mnan = MatType::Random(rows,cols),
24 minf = MatType::Random(rows,cols),
25 mboth = MatType::Random(rows,cols);
27 int n = internal::random<int>(1,10);
28 for(
int k=0; k<
n; ++k)
30 mnan(internal::random<int>(0,rows-1), internal::random<int>(0,cols-1)) = nan;
31 minf(internal::random<int>(0,rows-1), internal::random<int>(0,cols-1)) =
inf;
39 VERIFY((s1*mnan).hasNaN());
41 VERIFY(!(2*minf).hasNaN());
43 VERIFY(mboth.array().hasNaN());
47 VERIFY(!(minf-mboth).allFinite());
48 VERIFY(!mboth.allFinite());
49 VERIFY(!mboth.array().allFinite());
55 CALL_SUBTEST_1( special_numbers<float>() );
56 CALL_SUBTEST_1( special_numbers<double>() );
void test_special_numbers()