From c1d356e8b4b84fa5c7172567d5529f52191ed85b Mon Sep 17 00:00:00 2001 From: Christoph Hertzberg Date: Wed, 5 Dec 2018 15:01:04 +0100 Subject: [PATCH] bug #1635: Use infinity from Numtraits instead of creating it manually. --- Eigen/src/Core/ConditionEstimator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Eigen/src/Core/ConditionEstimator.h b/Eigen/src/Core/ConditionEstimator.h index 8c1a89129..51a2e5f1b 100644 --- a/Eigen/src/Core/ConditionEstimator.h +++ b/Eigen/src/Core/ConditionEstimator.h @@ -160,7 +160,7 @@ rcond_estimate_helper(typename Decomposition::RealScalar matrix_norm, const Deco { typedef typename Decomposition::RealScalar RealScalar; eigen_assert(dec.rows() == dec.cols()); - if (dec.rows() == 0) return RealScalar(1)/RealScalar(0); + if (dec.rows() == 0) return NumTraits::infinity(); if (matrix_norm == RealScalar(0)) return RealScalar(0); if (dec.rows() == 1) return RealScalar(1); const RealScalar inverse_matrix_norm = rcond_invmatrix_L1_norm_estimate(dec);