From dacb469bc93b5b8578afad19d327606659ec3a55 Mon Sep 17 00:00:00 2001 From: Christoph Hertzberg Date: Thu, 5 May 2016 13:35:45 +0200 Subject: Enable and fix -Wdouble-conversion warnings --- Eigen/src/SVD/BDCSVD.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Eigen/src/SVD') diff --git a/Eigen/src/SVD/BDCSVD.h b/Eigen/src/SVD/BDCSVD.h index 8df570647..799e81bd7 100644 --- a/Eigen/src/SVD/BDCSVD.h +++ b/Eigen/src/SVD/BDCSVD.h @@ -765,14 +765,14 @@ void BDCSVD::computeSingVals(const ArrayRef& col0, const ArrayRef& d RealScalar muPrev, muCur; if (shift == left) { - muPrev = (right - left) * 0.1; + muPrev = (right - left) * RealScalar(0.1); if (k == actual_n-1) muCur = right - left; - else muCur = (right - left) * 0.5; + else muCur = (right - left) * RealScalar(0.5); } else { - muPrev = -(right - left) * 0.1; - muCur = -(right - left) * 0.5; + muPrev = -(right - left) * RealScalar(0.1); + muCur = -(right - left) * RealScalar(0.5); } RealScalar fPrev = secularEq(muPrev, col0, diag, perm, diagShifted, shift); @@ -820,11 +820,11 @@ void BDCSVD::computeSingVals(const ArrayRef& col0, const ArrayRef& d leftShifted = (std::numeric_limits::min)(); // I don't understand why the case k==0 would be special there: // if (k == 0) rightShifted = right - left; else - rightShifted = (k==actual_n-1) ? right : ((right - left) * 0.6); // theoretically we can take 0.5, but let's be safe + rightShifted = (k==actual_n-1) ? right : ((right - left) * RealScalar(0.6)); // theoretically we can take 0.5, but let's be safe } else { - leftShifted = -(right - left) * 0.6; + leftShifted = -(right - left) * RealScalar(0.6); rightShifted = -(std::numeric_limits::min)(); } -- cgit v1.2.3