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/MathFunctions.h | |
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/MathFunctions.h')
-rw-r--r-- | Eigen/src/Core/MathFunctions.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Eigen/src/Core/MathFunctions.h b/Eigen/src/Core/MathFunctions.h index 1eeb2752b..fcf62011e 100644 --- a/Eigen/src/Core/MathFunctions.h +++ b/Eigen/src/Core/MathFunctions.h @@ -550,9 +550,8 @@ namespace std_fallback { EIGEN_USING_STD_MATH(log); Scalar x1p = RealScalar(1) + x; Scalar log_1p = log(x1p); - const bool is_inf = numext::equal_strict(x1p, log_1p); const bool is_small = numext::equal_strict(x1p, Scalar(1)); - return (is_inf || is_small) ? x : x * (log_1p / (x1p - RealScalar(1))); + return is_small ? x : x * (log_1p / (x1p - RealScalar(1))); } } |