diff options
author | Christoph Hertzberg <chtz@informatik.uni-bremen.de> | 2016-05-22 18:17:04 +0200 |
---|---|---|
committer | Christoph Hertzberg <chtz@informatik.uni-bremen.de> | 2016-05-22 18:17:04 +0200 |
commit | 718521d5cfab91f17c39e0160e617f9a93c15bf1 (patch) | |
tree | 5b96509e309ed6ea99256b0082acd4c2169abbf7 /test | |
parent | b5a7603822825a5c065453434f1fbffdff8678a8 (diff) |
Silenced several double-promotion warnings
Diffstat (limited to 'test')
-rw-r--r-- | test/geo_quaternion.cpp | 2 | ||||
-rw-r--r-- | test/packetmath.cpp | 2 | ||||
-rw-r--r-- | test/qr_colpivoting.cpp | 6 |
3 files changed, 6 insertions, 4 deletions
diff --git a/test/geo_quaternion.cpp b/test/geo_quaternion.cpp index 558acf29f..f9e45f027 100644 --- a/test/geo_quaternion.cpp +++ b/test/geo_quaternion.cpp @@ -55,7 +55,7 @@ template<typename Scalar, int Options> void quaternion(void) Scalar largeEps = test_precision<Scalar>(); if (internal::is_same<Scalar,float>::value) - largeEps = 1e-3f; + largeEps = Scalar(1e-3); Scalar eps = internal::random<Scalar>() * Scalar(1e-2); diff --git a/test/packetmath.cpp b/test/packetmath.cpp index 3e4eb1414..11e5644bc 100644 --- a/test/packetmath.cpp +++ b/test/packetmath.cpp @@ -431,7 +431,7 @@ template<typename Scalar> void packetmath_real() // VERIFY_IS_EQUAL(std::log(std::numeric_limits<Scalar>::denorm_min()), data2[0]); VERIFY((numext::isnan)(data2[1])); - data1[0] = -1.0f; + data1[0] = Scalar(-1.0f); h.store(data2, internal::plog(h.load(data1))); VERIFY((numext::isnan)(data2[0])); #if !EIGEN_FAST_MATH diff --git a/test/qr_colpivoting.cpp b/test/qr_colpivoting.cpp index ef3a6173b..38de635a7 100644 --- a/test/qr_colpivoting.cpp +++ b/test/qr_colpivoting.cpp @@ -204,9 +204,11 @@ template<typename MatrixType> void qr_kahan_matrix() m1.setZero(rows,cols); RealScalar s = std::pow(NumTraits<RealScalar>::epsilon(), 1.0 / rows); RealScalar c = std::sqrt(1 - s*s); + RealScalar pow_s_i(1.0); // pow(s,i) for (Index i = 0; i < rows; ++i) { - m1(i, i) = pow(s, i); - m1.row(i).tail(rows - i - 1) = -RealScalar(pow(s, i)) * c * MatrixType::Ones(1, rows - i - 1); + m1(i, i) = pow_s_i; + m1.row(i).tail(rows - i - 1) = -pow_s_i * c * MatrixType::Ones(1, rows - i - 1); + pow_s_i *= s; } m1 = (m1 + m1.transpose()).eval(); ColPivHouseholderQR<MatrixType> qr(m1); |