From ce3557ca69742af477546d031d644a6dab1ff614 Mon Sep 17 00:00:00 2001 From: Christoph Hertzberg Date: Fri, 16 Sep 2016 14:24:47 +0200 Subject: Make makeHouseholder more stable for cases where real(c0) is not very small (but the rest is). --- Eigen/src/Householder/Householder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Eigen/src/Householder/Householder.h') diff --git a/Eigen/src/Householder/Householder.h b/Eigen/src/Householder/Householder.h index 4c1f499a1..31f804a99 100644 --- a/Eigen/src/Householder/Householder.h +++ b/Eigen/src/Householder/Householder.h @@ -77,7 +77,7 @@ void MatrixBase::makeHouseholder( Scalar c0 = coeff(0); const RealScalar tol = (std::numeric_limits::min)(); - if(tailSqNorm <= tol && numext::abs2(numext::imag(c0))<=tol) + if(tailSqNorm <= tol && numext::abs2(c0)<=tol) { tau = RealScalar(0); beta = numext::real(c0); -- cgit v1.2.3