# HG changeset patch # User jwe # Date 1191675479 0 # Node ID c8fc3487ed2c5824767156da7e75632a6b8a9b2c # Parent 65a28e9de0a5998d844beabf3840c196812338dd [project @ 2007-10-06 12:57:58 by jwe] diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2007-10-06 John W. Eaton + + * polynomial/residue.m: New test from test/test_poly.m. + 2007-10-06 Søren Hauberg * image/saveimage.m: Handle saving color images without a colormap. diff --git a/scripts/polynomial/residue.m b/scripts/polynomial/residue.m --- a/scripts/polynomial/residue.m +++ b/scripts/polynomial/residue.m @@ -314,3 +314,13 @@ pden = polyreduce (pden); endfunction + +%% test/octave.test/poly/residue-1.m +%!test +%! b = [1, 1, 1]; +%! a = [1, -5, 8, -4]; +%! [r, p, k, e] = residue (b, a); +%! assert((abs (r - [-2; 7; 3]) < 1e-6 +%! && abs (p - [2; 2; 1]) < 1e-7 +%! && isempty (k) +%! && e == [1; 2; 1])); diff --git a/test/ChangeLog b/test/ChangeLog --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,7 @@ +2007-10-06 John W. Eaton + + * test_poly.m: Move residue test to residue.m. + 2007-09-29 Kim Hansen * test_range.m: Test range data diff --git a/test/test_poly.m b/test/test_poly.m --- a/test/test_poly.m +++ b/test/test_poly.m @@ -155,16 +155,6 @@ %% test/octave.test/poly/polyvalm-2.m %!error polyvalm ([1, 1, 1], [1, 2; 3, 4; 5, 6]); -%% test/octave.test/poly/residue-1.m -%!test -%! b = [1, 1, 1]; -%! a = [1, -5, 8, -4]; -%! [r, p, k, e] = residue (b, a); -%! assert((abs (r - [-2; 7; 3]) < 1e-6 -%! && abs (p - [2; 2; 1]) < 1e-7 -%! && isempty (k) -%! && e == [1; 2; 1])); - %% test/octave.test/poly/roots-1.m %!assert(all (all (abs (roots ([1, -6, 11, -6]) - [3; 2; 1]) < sqrt (eps))));