mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-13 20:26:03 +08:00
fix isinf(complex(inf,NaN)) to return false.
This commit is contained in:
parent
b0d5aaafcc
commit
93a62265dc
@ -841,7 +841,7 @@ template<typename T>
|
|||||||
EIGEN_DEVICE_FUNC
|
EIGEN_DEVICE_FUNC
|
||||||
bool (isinf)(const std::complex<T>& x)
|
bool (isinf)(const std::complex<T>& x)
|
||||||
{
|
{
|
||||||
return numext::isinf(numext::real(x)) || numext::isinf(numext::imag(x));
|
return (numext::isinf(numext::real(x)) || numext::isinf(numext::imag(x))) && (!numext::isnan(x));
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename Scalar>
|
template<typename Scalar>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user