aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Eigenvalues/EigenSolver.h
diff options
context:
space:
mode:
Diffstat (limited to 'Eigen/src/Eigenvalues/EigenSolver.h')
-rw-r--r--Eigen/src/Eigenvalues/EigenSolver.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/Eigen/src/Eigenvalues/EigenSolver.h b/Eigen/src/Eigenvalues/EigenSolver.h
index 1ff24e5c0..af9cf357b 100644
--- a/Eigen/src/Eigenvalues/EigenSolver.h
+++ b/Eigen/src/Eigenvalues/EigenSolver.h
@@ -450,7 +450,7 @@ void EigenSolver<MatrixType>::doComputeEigenvectors()
Scalar q = m_eivalues.coeff(n).imag();
// Scalar vector
- if (q == 0)
+ if (q == static_cast<Scalar>(0))
{
Scalar lastr=0, lastw=0;
Index l = n;
@@ -491,12 +491,12 @@ void EigenSolver<MatrixType>::doComputeEigenvectors()
// Overflow control
Scalar t = internal::abs(m_matT.coeff(i,n));
- if ((eps * t) * t > 1)
+ if ((eps * t) * t > Scalar(1))
m_matT.col(n).tail(size-i) /= t;
}
}
}
- else if (q < 0 && n > 0) // Complex vector
+ else if (q < Scalar(0) && n > 0) // Complex vector
{
Scalar lastra=0, lastsa=0, lastw=0;
Index l = n-1;
@@ -530,7 +530,7 @@ void EigenSolver<MatrixType>::doComputeEigenvectors()
else
{
l = i;
- if (m_eivalues.coeff(i).imag() == 0)
+ if (m_eivalues.coeff(i).imag() == static_cast<Scalar>(0))
{
std::complex<Scalar> cc = cdiv(-ra,-sa,w,q);
m_matT.coeffRef(i,n-1) = internal::real(cc);
@@ -564,7 +564,7 @@ void EigenSolver<MatrixType>::doComputeEigenvectors()
// Overflow control
Scalar t = std::max(internal::abs(m_matT.coeff(i,n-1)),internal::abs(m_matT.coeff(i,n)));
- if ((eps * t) * t > 1)
+ if ((eps * t) * t > static_cast<Scalar>(1))
m_matT.block(i, n-1, size-i, 2) /= t;
}