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	Thu Jun 07 00:24:25 2001 +0000
+++ b/liboctave/CMatrix.cc	Thu Jun 07 19:00:42 2001 +0000
@@ -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	Thu Jun 07 00:24:25 2001 +0000
+++ b/liboctave/ChangeLog	Thu Jun 07 19:00:42 2001 +0000
@@ -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	Thu Jun 07 00:24:25 2001 +0000
+++ b/liboctave/dMatrix.cc	Thu Jun 07 19:00:42 2001 +0000
@@ -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;