diff options
author | Srinivas Vasudevan <srvasude@gmail.com> | 2016-12-05 14:01:45 -0800 |
---|---|---|
committer | Srinivas Vasudevan <srvasude@gmail.com> | 2016-12-05 14:01:45 -0800 |
commit | e6c8b5500c9ce33203cb7ab9a4794c3b6f678429 (patch) | |
tree | e3baca1cae7a516fe2b205756db73c38e98ed728 /Eigen/src/Core/MathFunctions.h | |
parent | f7d7c33a28f1f0687eb7db312a67715a83c761ba (diff) |
Change comparisons to use Scalar instead of RealScalar.
Diffstat (limited to 'Eigen/src/Core/MathFunctions.h')
-rw-r--r-- | Eigen/src/Core/MathFunctions.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Eigen/src/Core/MathFunctions.h b/Eigen/src/Core/MathFunctions.h index af02d0247..7a6b999af 100644 --- a/Eigen/src/Core/MathFunctions.h +++ b/Eigen/src/Core/MathFunctions.h @@ -13,8 +13,6 @@ // source: http://www.geom.uiuc.edu/~huberty/math5337/groupe/digits.html // TODO this should better be moved to NumTraits #define EIGEN_PI 3.141592653589793238462643383279502884197169399375105820974944592307816406L -#define EIGEN_LN2 0.69314718055994530941723212145817656807550013436024425412068001L - namespace Eigen { @@ -499,10 +497,11 @@ namespace std_fallback { EIGEN_USING_STD_MATH(exp); Scalar u = exp(x); - if (u == RealScalar(1)) { + if (u == Scalar(1)) { return x; } - if (u - RealScalar(1) == RealScalar(-1)) { + Scalar um1 = u - RealScalar(1); + if (um1 == Scalar(-1)) { return RealScalar(-1); } |