mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-15 07:10:37 +08:00
Don't test the division by 0 on float16 when compiling with msvc since msvc detects and errors out on divisions by 0.
This commit is contained in:
parent
cd2b667ac8
commit
2d072b38c1
@ -64,9 +64,13 @@ void test_conversion()
|
||||
VERIFY((numext::isnan)(float(half(__half{0xfc01}))));
|
||||
VERIFY((numext::isinf)(float(half(__half{0x7c00}))));
|
||||
VERIFY((numext::isnan)(float(half(__half{0x7c01}))));
|
||||
|
||||
#if !EIGEN_COMP_MSVC
|
||||
// Visual Studio errors out on divisions by 0
|
||||
VERIFY((numext::isnan)(float(half(0.0 / 0.0))));
|
||||
VERIFY((numext::isinf)(float(half(1.0 / 0.0))));
|
||||
VERIFY((numext::isinf)(float(half(-1.0 / 0.0))));
|
||||
#endif
|
||||
|
||||
// Exactly same checks as above, just directly on the half representation.
|
||||
VERIFY(!(numext::isinf)(half(__half{0x7bff})));
|
||||
@ -75,9 +79,13 @@ void test_conversion()
|
||||
VERIFY((numext::isnan)(half(__half{0xfc01})));
|
||||
VERIFY((numext::isinf)(half(__half{0x7c00})));
|
||||
VERIFY((numext::isnan)(half(__half{0x7c01})));
|
||||
|
||||
#if !EIGEN_COMP_MSVC
|
||||
// Visual Studio errors out on divisions by 0
|
||||
VERIFY((numext::isnan)(half(0.0 / 0.0)));
|
||||
VERIFY((numext::isinf)(half(1.0 / 0.0)));
|
||||
VERIFY((numext::isinf)(half(-1.0 / 0.0)));
|
||||
#endif
|
||||
}
|
||||
|
||||
void test_arithmetic()
|
||||
|
Loading…
Reference in New Issue
Block a user