# HG changeset patch # User jwe # Date 1192556804 0 # Node ID f0142f2afdc638f2c9df197284b7e12d58af167f # Parent 4d4197ffb09dd47293a3c583458ed850662648a2 [project @ 2007-10-16 17:46:44 by jwe] diff -r 4d4197ffb09d -r f0142f2afdc6 liboctave/CMatrix.cc --- a/liboctave/CMatrix.cc Mon Oct 15 16:31:55 2007 +0000 +++ b/liboctave/CMatrix.cc Tue Oct 16 17:46:44 2007 +0000 @@ -1202,7 +1202,7 @@ if (!mattype.is_hermitian ()) ret = finverse(mattype, info, rcond, force, calc_cond); - if (rcond == 0.) + if ((mattype.is_hermitian () || calc_cond) && rcond == 0.) ret = ComplexMatrix (rows (), columns (), Complex (octave_Inf, 0.)); } diff -r 4d4197ffb09d -r f0142f2afdc6 liboctave/ChangeLog --- a/liboctave/ChangeLog Mon Oct 15 16:31:55 2007 +0000 +++ b/liboctave/ChangeLog Tue Oct 16 17:46:44 2007 +0000 @@ -1,3 +1,9 @@ +2007-10-16 John W. Eaton + + * dMatrix.cc (Matrix::inverse): Only check rcond == 0 if the + matrix is hermitian or calc_cond is true. + * CMatrix.cc (ComplexMatrix::inverse): Likewise. + 2007-10-12 John W. Eaton * Change copyright notices in all files that are part of Octave to diff -r 4d4197ffb09d -r f0142f2afdc6 liboctave/dMatrix.cc --- a/liboctave/dMatrix.cc Mon Oct 15 16:31:55 2007 +0000 +++ b/liboctave/dMatrix.cc Tue Oct 16 17:46:44 2007 +0000 @@ -871,7 +871,7 @@ if (!mattype.is_hermitian ()) ret = finverse(mattype, info, rcond, force, calc_cond); - if (rcond == 0.) + if ((mattype.is_hermitian () || calc_cond) && rcond == 0.) ret = Matrix (rows (), columns (), octave_Inf); }