diff src/DLD-FUNCTIONS/inv.cc @ 5064:a6755bc45f15

[project @ 2004-11-04 16:34:57 by jwe]
author jwe
date Thu, 04 Nov 2004 16:34:57 +0000
parents 1c4a00f4bfb9
children 23b37da9fd5b
line wrap: on
line diff
--- a/src/DLD-FUNCTIONS/inv.cc	Thu Nov 04 16:15:10 2004 +0000
+++ b/src/DLD-FUNCTIONS/inv.cc	Thu Nov 04 16:34:57 2004 +0000
@@ -74,7 +74,7 @@
       if (! error_state)
 	{
 	  int info;
-	  volatile double rcond = 0.0;
+	  double rcond = 0.0;
 
 	  Matrix result = m.inverse (info, rcond, 1);
 
@@ -83,7 +83,9 @@
 
 	  retval(0) = result;
 
-	  if (nargout < 2 && (info == -1 || 1.0 + rcond == 1.0))
+	  volatile double xrcond = rcond;
+	  xrcond += 1.0;
+	  if (nargout < 2 && (info == -1 || xrcond == 1.0))
 	    warning ("inverse: matrix singular to machine precision,\
  rcond = %g", rcond);
 	}
@@ -95,7 +97,7 @@
       if (! error_state)
 	{
 	  int info;
-	  volatile double rcond = 0.0;
+	  double rcond = 0.0;
 
 	  ComplexMatrix result = m.inverse (info, rcond, 1);
 
@@ -104,7 +106,9 @@
 
 	  retval(0) = result;
 
-	  if (nargout < 2 && (info == -1 || 1.0 + rcond == 1.0))
+	  volatile double xrcond = rcond;
+	  xrcond += 1.0;
+	  if (nargout < 2 && (info == -1 || xrcond == 1.0))
 	    warning ("inverse: matrix singular to machine precision,\
  rcond = %g", rcond);
 	}