From 848db4ed2d6431d8d39b9c0fca534d67ef7b0910 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. (cherry picked from commit 481a4a8c319640a3689be11c66b38cf1f9dc50b2) --- 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 6dcb986c1..79a6562b7 100644 --- a/Eigen/src/SVD/BDCSVD.h +++ b/Eigen/src/SVD/BDCSVD.h @@ -1035,7 +1035,7 @@ void BDCSVD::perturbCol0 #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;