[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Anyone familiar with polygcd?
From: |
Rik |
Subject: |
Anyone familiar with polygcd? |
Date: |
Mon, 07 Jul 2014 10:57:53 -0700 |
All,
I'm getting occasional failures from the test code in polygcd. It seems to
happen about 10% of the time according to the following code:
for i = 1:100
bm(i) = test ("polygcd");
endfor
sum (bm)
The test that fails is
%!test
%! for ii=1:10
%! p = (unique (randn (10, 1)) * 10).';
%! p1 = p(3:end);
%! p2 = p(1:end-2);
%! assert (polygcd (poly (-p1), poly (-p2)), poly (- intersect (p1, p2)),
sqrt (eps));
%! endfor
I tried a few different random seeds to see if I could fix the value to
something that would always pass, but no luck.
The simplest thing is to make this an %!xtest which can occasionally fail.
But if someone understands polygcd and could suggest a way to modify the
test that would be preferable.
The error I get is a dimensional mismatch:
!!!!! test failed
ASSERT errors for: assert (polygcd (poly (-p1), poly (-p2)),poly
(-intersect (p1, p2)),sqrt (eps))
Location | Observed | Expected | Reason
. O(1x1) E(1x7) Dimensions don't match
--Rik
- Anyone familiar with polygcd?,
Rik <=