Mercurial > hg > octave-lyh
changeset 3838:7b4bdb12b77b
[project @ 2001-06-07 19:00:42 by jwe]
author | jwe |
---|---|
date | Thu, 07 Jun 2001 19:00:42 +0000 |
parents | bb3e654d6684 |
children | db5b02fc39ea |
files | liboctave/CMatrix.cc liboctave/ChangeLog liboctave/dMatrix.cc |
diffstat | 3 files changed, 17 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/CMatrix.cc +++ b/liboctave/CMatrix.cc @@ -895,7 +895,7 @@ { volatile double rcond_plus_one = rcond + 1.0; - if (rcond_plus_one == 1.0) + if (rcond_plus_one == 1.0 || xisnan (rcond)) info = -1; if (info == -1 && ! force) @@ -1307,7 +1307,7 @@ { volatile double rcond_plus_one = rcond + 1.0; - if (rcond_plus_one == 1.0) + if (rcond_plus_one == 1.0 || xisnan (rcond)) { info = -1; retval = ComplexDET (); @@ -1413,7 +1413,7 @@ { volatile double rcond_plus_one = rcond + 1.0; - if (rcond_plus_one == 1.0) + if (rcond_plus_one == 1.0 || xisnan (rcond)) { info = -2; @@ -1531,12 +1531,12 @@ if (f77_exception_encountered) (*current_liboctave_error_handler) - ("unrecoverable error in dgeco"); + ("unrecoverable error in zgeco"); else { volatile double rcond_plus_one = rcond + 1.0; - if (rcond_plus_one == 1.0) + if (rcond_plus_one == 1.0 || xisnan (rcond)) { info = -2;
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,11 @@ +2001-06-07 John W. Eaton <jwe@bevo.che.wisc.edu> + + * dMatrix.cc (Matrix::inverse, Matrix::solve, Matrix::determinant, + Matrix::inverse): Handle the case of rcond being a NaN the same as + a signular matrix. From "Jianming" <caijianming@yahoo.co.uk>. + * CMatrix.cc (ComplexMatrix::inverse, ComplexMatrix::solve, + ComplexMatrix::determinant, ComplexMatrix::inverse): Likewise. + 2001-05-31 John W. Eaton <jwe@bevo.che.wisc.edu> * chMatrix.cc (charMatrix::row_as_string): New parameter, raw.
--- a/liboctave/dMatrix.cc +++ b/liboctave/dMatrix.cc @@ -593,7 +593,7 @@ { volatile double rcond_plus_one = rcond + 1.0; - if (rcond_plus_one == 1.0) + if (rcond_plus_one == 1.0 || xisnan (rcond)) info = -1; if (info == -1 && ! force) @@ -1003,7 +1003,7 @@ { volatile double rcond_plus_one = rcond + 1.0; - if (rcond_plus_one == 1.0) + if (rcond_plus_one == 1.0 || xisnan (rcond)) { info = -1; retval = DET (); @@ -1080,7 +1080,7 @@ { volatile double rcond_plus_one = rcond + 1.0; - if (rcond_plus_one == 1.0) + if (rcond_plus_one == 1.0 || xisnan (rcond)) { info = -2; @@ -1201,7 +1201,7 @@ { volatile double rcond_plus_one = rcond + 1.0; - if (rcond_plus_one == 1.0) + if (rcond_plus_one == 1.0 || xisnan (rcond)) { info = -2;