diff options
author | Gael Guennebaud <g.gael@free.fr> | 2016-09-17 14:14:01 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2016-09-17 14:14:01 +0200 |
commit | bf03820339f45f9483ddbe5bb927ca3078fda19b (patch) | |
tree | 11e192f4c584e77559cc59d72c1aa14030dedf0b | |
parent | de05a18fe0d9903b77182df41155794248fa0b09 (diff) |
Silent warning.
-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 438e6b2e5..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) /= T(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"; |