changeset 1655:593fff2e7e39

[project @ 1995-12-20 10:50:16 by jwe]
author jwe
date Wed, 20 Dec 1995 10:53:00 +0000
parents d513745073fb
children 5a8ad3d12304
files emacs/octave.el src/inv.cc src/xpow.cc
diffstat 3 files changed, 21 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/emacs/octave.el	Wed Dec 20 09:05:23 1995 +0000
+++ b/emacs/octave.el	Wed Dec 20 10:53:00 1995 +0000
@@ -1,4 +1,4 @@
-;; octave-mode.el --- Octave mode for GNU Emacs
+;; octave.el --- Octave mode for GNU Emacs
 
 ;;; Copyright (c) 1986, 1993, 1994, 1995 Free Software Foundation, Inc.
 
--- a/src/inv.cc	Wed Dec 20 09:05:23 1995 +0000
+++ b/src/inv.cc	Wed Dec 20 10:53:00 1995 +0000
@@ -76,13 +76,11 @@
 	  int info;
 	  double rcond = 0.0;
 
-	  Matrix minv = m.inverse (info, rcond);
+	  retval = m.inverse (info, rcond);
 
 	  if (info == -1)
 	    warning ("inverse: matrix singular to machine precision,\
  rcond = %g", rcond);
-	  else
-	    retval = minv;
 	}
     }
   else if (arg.is_complex_type ())
@@ -94,13 +92,11 @@
 	  int info;
 	  double rcond = 0.0;
 
-	  ComplexMatrix minv = m.inverse (info, rcond);
+	  retval = m.inverse (info, rcond);
 
 	  if (info == -1)
 	    warning ("inverse: matrix singular to machine precision,\
  rcond = %g", rcond);
-	  else
-	    retval = minv;
 	}
     }
   else
--- a/src/xpow.cc	Wed Dec 20 09:05:23 1995 +0000
+++ b/src/xpow.cc	Wed Dec 20 10:53:00 1995 +0000
@@ -202,7 +202,15 @@
 	      if (btmp < 0)
 		{
 		  btmp = -btmp;
-		  atmp = a.inverse ();
+
+		  int info;
+		  double rcond = 0.0;
+
+		  atmp = a.inverse (info, rcond);
+
+		  if (info == -1)
+		    warning ("inverse: matrix singular to machine\
+ precision, rcond = %g", rcond);
 		}
 	      else
 		atmp = a;
@@ -387,7 +395,15 @@
 	      if (btmp < 0)
 		{
 		  btmp = -btmp;
-		  atmp = a.inverse ();
+
+		  int info;
+		  double rcond = 0.0;
+
+		  atmp = a.inverse (info, rcond);
+
+		  if (info == -1)
+		    warning ("inverse: matrix singular to machine\
+ precision, rcond = %g", rcond);
 		}
 	      else
 		atmp = a;