[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #42742] polygcd fails valid test
From: |
Dan Sebald |
Subject: |
[Octave-bug-tracker] [bug #42742] polygcd fails valid test |
Date: |
Wed, 06 Aug 2014 21:24:50 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0 SeaMonkey/2.15 |
Follow-up Comment #3, bug #42742 (project octave):
I've attached a patch that implements polygcd() in the way I described. That
is, uses the roots() function and finds common roots. However, the first
impression is that it too has the same sorts of tolerance problems.
I increased the polygcd tolerance (i.e., the input parameter) and then get the
results expected, but the resulting polynomial coefficients then don't pass
the tolerance test, off by some factor slightly greater than 10*sqrt(eps).
I'm not sure about this numerical stability comment in the documentation for
plygcd(). It seems to me the bigger issue is that applying the tolerance in
the way it is done is the issue. Taking a look at some of the tests in
polygcd(), it seems to me that in one case a coefficient like 1 should be
within 10*sqrt(eps), but then also a coefficient like 20,000 should also be
accurate with 10*sqrt(eps). It's easily possible with polynomial orders of
say 8 to have numbers in the range of 1 to 2e4. There's nothing that takes
the magnitude of numbers into account. One would prefer a relative test, say
0.001%, rather than absolute in this case.
(file #31856)
_______________________________________________________
Additional Item Attachment:
File name: octave-polygcd_2014aug06.patch Size:1 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?42742>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/