From 6b3f81b4141b073f20f208549eee192ebdfe10d0 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Tue, 23 Feb 2010 16:26:39 -0500 Subject: [PATCH] precision improvement. Wtf were we using sqrt(precision) for the cutoff? Replaced by precision*biggest. --- Eigen/src/Cholesky/LDLT.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {