diff --git a/Eigen/src/Cholesky/LDLT.h b/Eigen/src/Cholesky/LDLT.h index a511a7dc4..8a466e1c7 100644 --- a/Eigen/src/Cholesky/LDLT.h +++ b/Eigen/src/Cholesky/LDLT.h @@ -97,7 +97,7 @@ void LDLT::compute(const MatrixType& a) const int size = a.rows(); m_matrix.resize(size, size); m_isPositiveDefinite = true; - const RealScalar eps = ei_sqrt(precision()); + const RealScalar eps = precision() * a.cwise().abs().maxCoeff(); if (size<=1) {