mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-13 04:09:10 +08:00
Revert part of !1583, which may cause underflow on ARM.
This commit is contained in:
parent
8cafbc4736
commit
112ad8b846
@ -129,7 +129,7 @@ EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Packet pldexp_generic(const Packet& a, con
|
||||
const PacketI e = pcast<Packet, PacketI>(pmin(pmax(exponent, pnegate(max_exponent)), max_exponent));
|
||||
PacketI b = parithmetic_shift_right<2>(e); // floor(e/4);
|
||||
Packet c = preinterpret<Packet>(plogical_shift_left<MantissaBits>(padd(b, bias))); // 2^b
|
||||
Packet out = pmul(pmul(a, c), pmul(c, c)); // a * 2^(3b)
|
||||
Packet out = pmul(pmul(pmul(a, c), c), c); // a * 2^(3b)
|
||||
b = pnmadd(pset1<PacketI>(3), b, e); // e - 3b
|
||||
c = preinterpret<Packet>(plogical_shift_left<MantissaBits>(padd(b, bias))); // 2^(e-3*b)
|
||||
out = pmul(out, c);
|
||||
|
Loading…
x
Reference in New Issue
Block a user