aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/MathFunctions.h
diff options
context:
space:
mode:
authorGravatar Rasmus Munk Larsen <rmlarsen@google.com>2019-08-27 15:35:29 -0700
committerGravatar Rasmus Munk Larsen <rmlarsen@google.com>2019-08-27 15:35:29 -0700
commit9aba527405b40132a308f5f782dacadf6ef50acd (patch)
treea5293be79a29c1fb068eb32217aa4f224e760410 /Eigen/src/Core/MathFunctions.h
parentb021cdea6dd84b0f51dd7aea691d47dd3eab8e9d (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.h3
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)));
}
}