mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-03 10:14:04 +08:00
Consider inf/nan in scalar test_isApprox.
This commit is contained in:
parent
1ddd3e29cb
commit
0c859cf35d
@ -424,7 +424,9 @@ template<> inline long double test_precision<std::complex<long double> >() { ret
|
||||
|
||||
#define EIGEN_TEST_SCALAR_TEST_OVERLOAD(TYPE) \
|
||||
inline bool test_isApprox(TYPE a, TYPE b) \
|
||||
{ return internal::isApprox(a, b, test_precision<TYPE>()); } \
|
||||
{ return numext::equal_strict(a, b) || \
|
||||
((numext::isnan)(a) && (numext::isnan)(b)) || \
|
||||
(internal::isApprox(a, b, test_precision<TYPE>())); } \
|
||||
inline bool test_isCwiseApprox(TYPE a, TYPE b, bool exact) \
|
||||
{ return numext::equal_strict(a, b) || \
|
||||
((numext::isnan)(a) && (numext::isnan)(b)) || \
|
||||
|
Loading…
x
Reference in New Issue
Block a user