changeset 7102:a627f27c1e8e

[project @ 2007-11-06 17:02:11 by jwe]
author jwe
date Tue, 06 Nov 2007 17:02:12 +0000
parents 2c5b14c60c6c
children 1ed1a94735a6
files liboctave/ChangeLog scripts/linear-algebra/__norm__.m src/ChangeLog src/data.cc src/parse.h
diffstat 5 files changed, 17 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/ChangeLog	Tue Nov 06 16:26:13 2007 +0000
+++ b/liboctave/ChangeLog	Tue Nov 06 17:02:12 2007 +0000
@@ -1,3 +1,9 @@
+2007-11-06  David Bateman  <dbateman@free.fr>
+
+	* MArray-def.h (MARRAY_NORM_BODY): Scale frobenius norm by infinity
+	norm to avoid issues of over- and underflow.  From Rolf Fabian
+	<Rolf.Fabian@gmx.de>.
+
 2007-10-30  David Bateman  <dbateman@free.fr>
 
 	* DASRT-opts.in, LSODE-opts.in: Doc fixes for small book format.
--- a/scripts/linear-algebra/__norm__.m	Tue Nov 06 16:26:13 2007 +0000
+++ b/scripts/linear-algebra/__norm__.m	Tue Nov 06 17:02:12 2007 +0000
@@ -43,7 +43,7 @@
   if (ndims(x) == 2 && (rows (x) == 1 || columns (x) == 1))
     if (ischar (p))
       if (strcmp (p, "fro"))
-        inf_norm = norm (x, "inf")
+        inf_norm = norm (x, "inf");
 	retval = inf_norm .* sqrt (sum (abs (x ./ inf_norm) .^ 2));
       elseif (strcmp (p, "inf"))
         retval = max (abs (x));
@@ -69,7 +69,7 @@
   else
     if (ischar (p))
       if (strcmp (p, "fro"))
-        inf_norm = norm (x, "inf")
+        inf_norm = norm (x, "inf");
 	retval = inf_norm .* sqrt (sum (sum (abs (x ./ inf_norm) .^ 2)));
       elseif (strcmp (p, "inf"))
         retval = max (sum (abs (x')));
--- a/src/ChangeLog	Tue Nov 06 16:26:13 2007 +0000
+++ b/src/ChangeLog	Tue Nov 06 17:02:12 2007 +0000
@@ -1,14 +1,10 @@
 2007-11-06  John W. Eaton  <jwe@octave.org>
 
+	* data.cc (Fnorm): New tests.
+
 	* defun-int.h (DEFINE_FUNX_INSTALLER_FUN3): Don't install function
 	if check_version produces an error.
 
-2007-11-06  David Bateman  <dbateman@free.fr>
-
-	* MArray-def.h (MARRAY_NORM_BODY): Scale frobenius norm by infinity
-	norm to avoid issues of over- and underflow.  From Rolf Fabian
-	<Rolf.Fabian@gmx.de>.
-
 2007-11-05  John W. Eaton  <jwe@octave.org>
 
 	* pt-idx.cc (tree_index_expression::lvalue): Try to do a better
--- a/src/data.cc	Tue Nov 06 16:26:13 2007 +0000
+++ b/src/data.cc	Tue Nov 06 17:02:12 2007 +0000
@@ -2623,6 +2623,12 @@
 %!assert(norm(m,2), 34, -eps);
 %!assert(norm(m,Inf), 34);
 %!assert(norm(m,"inf"), 34);
+%!shared m2
+%! m2 = [1,2;3,4];
+%! flo = 1e-300;
+%! fhi = 1e+300;
+%!assert (norm (flo*m2, "fro"), sqrt (30)*flo, -eps)
+%!assert (norm (fhi*m2, "fro"), sqrt (30)*fhi, -eps)
 */
 
 // Compute various norms of the vector X.
--- a/src/parse.h	Tue Nov 06 16:26:13 2007 +0000
+++ b/src/parse.h	Tue Nov 06 17:02:12 2007 +0000
@@ -37,7 +37,7 @@
 class tree;
 class tree_matrix;
 class tree_identifier;
-class octaev_function;
+class octave_function;
 class symbol_record;
 class symbol_table;