diff options
author | 2016-10-05 18:48:55 -0700 | |
---|---|---|
committer | 2016-10-05 18:48:55 -0700 | |
commit | 78b569f68540c5609388864bd805dcf21dd6a187 (patch) | |
tree | 0a5757bb11834d0109f99310f4493dfd63579901 /test/fastmath.cpp | |
parent | 9c2b6c049be19fd4c571b0df537169d277b26291 (diff) | |
parent | 4387433acf9cd2eab3713349163cd1e8905b5854 (diff) |
Merged latest updates from trunk
Diffstat (limited to 'test/fastmath.cpp')
-rw-r--r-- | test/fastmath.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/fastmath.cpp b/test/fastmath.cpp index efdd5b313..cc5db0746 100644 --- a/test/fastmath.cpp +++ b/test/fastmath.cpp @@ -49,7 +49,8 @@ void check_inf_nan(bool dryrun) { VERIFY( !m.allFinite() ); VERIFY( m.hasNaN() ); } - m(4) /= 0.0; + T hidden_zero = (std::numeric_limits<T>::min)()*(std::numeric_limits<T>::min)(); + m(4) /= hidden_zero; if(dryrun) { std::cout << "std::isfinite(" << m(4) << ") = "; check((std::isfinite)(m(4)),false); std::cout << " ; numext::isfinite = "; check((numext::isfinite)(m(4)), false); std::cout << "\n"; |