# HG changeset patch # User jwe # Date 819456780 0 # Node ID 593fff2e7e39c35c41eea4e16f7e23ee9e054c35 # Parent d513745073fbcfdc7ad59f273a0a131f4bfda8fb [project @ 1995-12-20 10:50:16 by jwe] diff -r d513745073fb -r 593fff2e7e39 emacs/octave.el --- 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. diff -r d513745073fb -r 593fff2e7e39 src/inv.cc --- 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 diff -r d513745073fb -r 593fff2e7e39 src/xpow.cc --- 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;