Seed to reproduce: s1301044630 The problem happens when testing the rank of a rank 1 matrix. In ColPivHouseholderQR::rank(), line 202, there is like a factor 2 or 3 between premultiplied_threshold and the and the second biggest pivot which are both 1e-16 times smaller than the biggest. So nothing serious. Nevertheless, if in the creation of a rank-one matrix (test/main.h, line 423), I remove the normalized(), then the "probably wrong negatives" go away.
For the record, reflapack or mkl does no fails on this particular seed, but they fails on other matrices, e.g. with a rank 2 while Eigen passes. So I'd say even. Here is the piece of code to call LAPACK from ColPivHouseholderQR (for complexes): int M = rows; int N = cols; int LDA = rows; int INFO = 0; VectorXd rwork(2*cols); VectorXi jpvt(cols); jpvt.setZero(); m_qr = matrix; zgeqpf_( &M, &N, &m_qr.real().coeffRef(0,0), &LDA, jpvt.data(), &m_hCoeffs.real().coeffRef(0), &m_temp.real().coeffRef(0), rwork.data(), &INFO); m_maxpivot = internal::real(m_qr(0,0)); m_nonzero_pivots = 0; for(Index k = 0; k < size; ++k) if(m_qr(k,k)!=Scalar(0)) m_nonzero_pivots++; m_colsTranspositions = jpvt.cast<typename IntRowVectorType::Index>().array() - 1; m_colsPermutation.setIdentity(cols); for(Index k = 0; k < m_nonzero_pivots; ++k) m_colsPermutation.applyTranspositionOnTheRight(k, m_colsTranspositions.coeff(k)); m_isInitialized = true; return *this;
-- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/236.