From 718521d5cfab91f17c39e0160e617f9a93c15bf1 Mon Sep 17 00:00:00 2001 From: Christoph Hertzberg Date: Sun, 22 May 2016 18:17:04 +0200 Subject: Silenced several double-promotion warnings --- test/qr_colpivoting.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test/qr_colpivoting.cpp') 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 void qr_kahan_matrix() m1.setZero(rows,cols); RealScalar s = std::pow(NumTraits::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 qr(m1); -- cgit v1.2.3