diff src/DLD-FUNCTIONS/det.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 1e6f653ef1e3
line wrap: on
line diff
--- a/src/DLD-FUNCTIONS/det.cc	Thu Nov 04 16:15:10 2004 +0000
+++ b/src/DLD-FUNCTIONS/det.cc	Thu Nov 04 16:34:57 2004 +0000
@@ -80,20 +80,23 @@
       if (! error_state)
 	{
 	  int info;
-	  volatile double rcond = 0.0;
-
+	  double rcond = 0.0;
 
 	  if (nargout > 1)
 	    {
 	      DET det = m.determinant (info, rcond);
 	      retval(1) = rcond;
-	      retval(0) = ((info == -1 || 1.0 + rcond == 1.0)
+	      volatile double xrcond = rcond;
+	      xrcond += 1.0;
+	      retval(0) = ((info == -1 || xrcond == 1.0)
 			   ? 0.0 : det.value ());
 	    }
 	  else
 	    {
 	      DET det = m.determinant (info);
-	      retval(0) = ((info == -1 || 1.0 + rcond == 1.0)
+	      volatile double xrcond = rcond;
+	      xrcond += 1.0;
+	      retval(0) = ((info == -1 || xrcond == 1.0)
 			   ? 0.0 : det.value ());
 	    }
 	}
@@ -105,19 +108,23 @@
       if (! error_state)
 	{
 	  int info;
-	  volatile double rcond = 0.0;
+	  double rcond = 0.0;
 
 	  if (nargout > 1)
 	    {
 	      ComplexDET det = m.determinant (info, rcond);
 	      retval(1) = rcond;
-	      retval(0) = ((info == -1 || 1.0 + rcond == 1.0)
+	      volatile double xrcond = rcond;
+	      xrcond += 1.0;
+	      retval(0) = ((info == -1 || xrcond == 1.0)
 			   ? Complex (0.0) : det.value ());
 	    }
 	  else
 	    {
 	      ComplexDET det = m.determinant (info);
-	      retval(0) = ((info == -1 | 1.0 + rcond == 1.0)
+	      volatile double xrcond = rcond;
+	      xrcond += 1.0;
+	      retval(0) = ((info == -1 || xrcond == 1.0)
 			   ? Complex (0.0) : det.value ());
 	    }
 	}