mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
Fix frexp packetmath tests for MSVC.
This commit is contained in:
parent
d58e629130
commit
2ed4bee78f
@ -76,6 +76,12 @@ inline T REF_FREXP(const T& x, T& exp) {
|
|||||||
EIGEN_USING_STD(frexp)
|
EIGEN_USING_STD(frexp)
|
||||||
const T out = static_cast<T>(frexp(x, &iexp));
|
const T out = static_cast<T>(frexp(x, &iexp));
|
||||||
exp = static_cast<T>(iexp);
|
exp = static_cast<T>(iexp);
|
||||||
|
|
||||||
|
// The exponent value is unspecified if the input is inf or NaN, but MSVC
|
||||||
|
// seems to set it to 1. We need to set it back to zero for consistency.
|
||||||
|
if (!(numext::isfinite)(x)) {
|
||||||
|
exp = T(0);
|
||||||
|
}
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user