From bdcb5f33043c559c7100f8fd5eb55fbbd0cdfc69 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Mon, 11 Feb 2019 22:56:19 +0100 Subject: [PATCH] Let's properly use Score instead of std::abs, and remove deprecated FIXME ( a /= b does a/b and not a * (1/b) as it was a long time ago...) --- Eigen/src/LU/PartialPivLU.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Eigen/src/LU/PartialPivLU.h b/Eigen/src/LU/PartialPivLU.h index 12e72880d..cba7a0fcf 100644 --- a/Eigen/src/LU/PartialPivLU.h +++ b/Eigen/src/LU/PartialPivLU.h @@ -387,8 +387,6 @@ struct partial_lu_impl ++nb_transpositions; } - // FIXME shall we introduce a safe quotient expression in cas 1/lu.coeff(k,k) - // overflow but not the actual quotient? lu.col(k).tail(fix(rrows)) /= lu.coeff(k,k); } else if(first_zero_pivot==-1) @@ -407,7 +405,7 @@ struct partial_lu_impl { Index k = endk; row_transpositions[k] = PivIndex(k); - if (std::abs(lu(k, k)) == 0 && first_zero_pivot == -1) + if (Scoring()(lu(k, k)) == Score(0) && first_zero_pivot == -1) first_zero_pivot = k; }