Join GitHub today
Dtrcon vs. Dgecon infinity norm mismatch #636
Dtrcon sometimes gives different results than Dgecon for the condition number of a matrix.
Take the matrix
The infinity norm of this matrix is 27 (8 + 9 + 10)
Running Dgecon on the LU factorization of this matrix I indeed get this answer. Running Dtrcon I get 0.074074. Based on my reading of the Dtrcon description, these two answers should be the same. I don't think it's a problem with OpenBLAS specifically, as I get the same 0.074074 with my Go implementation of the Dtrcon algorithm. Happy to file a Lapack bug if you agree this is an issue.
Also this is due to the pivoting done in DGETRF (for DGECON). If I remove the pivoting in DGETF2 (this matrix is too small for the blocked algorithm), then DGECON returns the same (slightly inexact) condition number. It seems that a bare triangular solve (DTRSV in this case) is not accurate enough and the difference is enough for DLACN2 to converge to an inexact estimate.