# HG changeset patch # User jwe # Date 1194368532 0 # Node ID a627f27c1e8e40d5a6fefd70cf5e4cc051684e79 # Parent 2c5b14c60c6c6e751ab7d6430a0c5bfc70527123 [project @ 2007-11-06 17:02:11 by jwe] diff -r 2c5b14c60c6c -r a627f27c1e8e liboctave/ChangeLog --- 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 + + * MArray-def.h (MARRAY_NORM_BODY): Scale frobenius norm by infinity + norm to avoid issues of over- and underflow. From Rolf Fabian + . + 2007-10-30 David Bateman * DASRT-opts.in, LSODE-opts.in: Doc fixes for small book format. diff -r 2c5b14c60c6c -r a627f27c1e8e scripts/linear-algebra/__norm__.m --- 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'))); diff -r 2c5b14c60c6c -r a627f27c1e8e src/ChangeLog --- 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 + * 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 - - * MArray-def.h (MARRAY_NORM_BODY): Scale frobenius norm by infinity - norm to avoid issues of over- and underflow. From Rolf Fabian - . - 2007-11-05 John W. Eaton * pt-idx.cc (tree_index_expression::lvalue): Try to do a better diff -r 2c5b14c60c6c -r a627f27c1e8e src/data.cc --- 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. diff -r 2c5b14c60c6c -r a627f27c1e8e src/parse.h --- 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;