aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core
diff options
context:
space:
mode:
authorGravatar Ola Røer Thorsen <ola@silentwings.no>2016-05-04 10:52:08 +0200
committerGravatar Ola Røer Thorsen <ola@silentwings.no>2016-05-04 10:52:08 +0200
commitbe78aea6b3d2443d1c614a0da7a56dfefbad4520 (patch)
treecfdb659898138800d1031c8d5809cdcc9b6c5388 /Eigen/src/Core
parent75a94b966246f3987d3a95ea6d5feaba6ecc2d03 (diff)
fix double-promotion/float-conversion in Core/SpecialFunctions.h
Diffstat (limited to 'Eigen/src/Core')
-rw-r--r--Eigen/src/Core/SpecialFunctions.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Eigen/src/Core/SpecialFunctions.h b/Eigen/src/Core/SpecialFunctions.h
index 3513a5c63..c6a50bb1d 100644
--- a/Eigen/src/Core/SpecialFunctions.h
+++ b/Eigen/src/Core/SpecialFunctions.h
@@ -284,7 +284,7 @@ struct digamma_impl {
bool negative = false;
const Scalar maxnum = NumTraits<Scalar>::infinity();
- const Scalar m_pi(EIGEN_PI);
+ const Scalar m_pi = Scalar(EIGEN_PI);
const Scalar zero = Scalar(0);
const Scalar one = Scalar(1);
@@ -441,7 +441,7 @@ struct igamma_helper<float> {
EIGEN_DEVICE_FUNC
static EIGEN_STRONG_INLINE float big() {
// use epsneg (1.0 - epsneg == 1.0)
- return 1.0 / (NumTraits<float>::epsilon() / 2);
+ return 1.0f / (NumTraits<float>::epsilon() / 2);
}
};
@@ -742,7 +742,7 @@ struct igamma_impl {
const Scalar machep = igamma_helper<Scalar>::machep();
const Scalar maxlog = numext::log(NumTraits<Scalar>::highest());
- double ans, ax, c, r;
+ Scalar ans, ax, c, r;
/* Compute x**a * exp(-x) / gamma(a) */
ax = a * numext::log(x) - x - lgamma_impl<Scalar>::run(a);