changeset 19258:5d3111977623

Change a polygcd test to one that is more numerically accurate (bug #42742). * polygcd.m: Decreased the multiplier for the random polynomial coefficient test and increased number of tests by a factor of ten.
author Daniel J Sebald <daniel.sebald@ieee.org>
date Sun, 05 Oct 2014 11:23:25 -0500
parents eeb2a01cdc26
children ec037d41da06
files scripts/polynomial/polygcd.m
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/polynomial/polygcd.m	Sun Oct 05 21:41:14 2014 -0700
+++ b/scripts/polynomial/polygcd.m	Sun Oct 05 11:23:25 2014 -0500
@@ -91,10 +91,12 @@
 %!assert (deconv (poly (1:8), polygcd (poly (1:8), poly (3:12))), poly (1:2), sqrt (eps))
 
 %!test
-%! for ii=1:10
-%!   p  = (unique (randn (10, 1)) * 10).';
+%! for ii=1:100
+%!   ## Exhibits numerical problems for multipliers of ~4 and greater.
+%!   p  = (unique (randn (10, 1)) * 3).';
 %!   p1 = p(3:end);
 %!   p2 = p(1:end-2);
-%!   assert (polygcd (poly (-p1), poly (-p2)), poly (- intersect (p1, p2)), sqrt (eps));
+%!   assert (polygcd (poly (-p1), poly (-p2)),
+%!           poly (- intersect (p1, p2)), sqrt (eps));
 %! endfor