diff options
author | Rasmus Munk Larsen <rmlarsen@google.com> | 2019-08-27 15:35:29 -0700 |
---|---|---|
committer | Rasmus Munk Larsen <rmlarsen@google.com> | 2019-08-27 15:35:29 -0700 |
commit | 9aba527405b40132a308f5f782dacadf6ef50acd (patch) | |
tree | a5293be79a29c1fb068eb32217aa4f224e760410 /Eigen/src/Core/arch/Default | |
parent | b021cdea6dd84b0f51dd7aea691d47dd3eab8e9d (diff) |
Revert changes to std_falback::log1p that broke handling of arguments less than -1. Fix packet op accordingly.
Diffstat (limited to 'Eigen/src/Core/arch/Default')
-rw-r--r-- | Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h b/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h index 640aae05a..505a0eec8 100644 --- a/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h +++ b/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h @@ -137,10 +137,8 @@ Packet generic_plog1p(const Packet& x) Packet xp1 = padd(x, one); Packet small_mask = pcmp_eq(xp1, one); Packet log1 = plog(xp1); - // Add a check to handle x == +inf. - Packet pos_inf_mask = pcmp_eq(x, log1); Packet log_large = pmul(x, pdiv(log1, psub(xp1, one))); - return pselect(por(small_mask, pos_inf_mask), x, log_large); + return pselect(small_mask, x, log_large); } /** \internal \returns exp(x)-1 computed using W. Kahan's formula. |