From 481a4a8c319640a3689be11c66b38cf1f9dc50b2 Mon Sep 17 00:00:00 2001 From: Antonio Sanchez Date: Fri, 20 May 2022 08:17:07 -0700 Subject: [PATCH] Fix BDCSVD condition for failing with numerical issue. --- Eigen/src/SVD/BDCSVD.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Eigen/src/SVD/BDCSVD.h b/Eigen/src/SVD/BDCSVD.h index 2c1cbf922..17bd28869 100644 --- a/Eigen/src/SVD/BDCSVD.h +++ b/Eigen/src/SVD/BDCSVD.h @@ -1099,7 +1099,7 @@ void BDCSVD::perturbCol0(const ArrayRef& col0, const ArrayR #endif // Avoid index out of bounds. // Will end up setting zhat(k) = 0. - if (l == 0) { + if (i >= k && l == 0) { m_info = NumericalIssue; prod = 0; break;