mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
Use pnegate(pzero(x)) as a generic way to generate -0.0. Some compiler do not handle the literal -0.0 properly in fastmath mode.
This commit is contained in:
parent
7846c7387c
commit
c0d6a72611
@ -523,7 +523,7 @@ struct scalar_atan2_op {
|
||||
// See https://en.cppreference.com/w/cpp/numeric/math/atan2
|
||||
// for how corner cases are supposed to be handled according to the
|
||||
// IEEE floating-point standard (IEC 60559).
|
||||
const Packet kSignMask = pset1<Packet>(Scalar(-0.0));
|
||||
const Packet kSignMask = pnegate(pzero(x));
|
||||
const Packet kPi = pset1<Packet>(Scalar(EIGEN_PI));
|
||||
const Packet kPiO2 = pset1<Packet>(Scalar(EIGEN_PI / 2));
|
||||
const Packet kPiO4 = pset1<Packet>(Scalar(EIGEN_PI / 4));
|
||||
|
Loading…
x
Reference in New Issue
Block a user