Skip to content
Prev 4940 / 63421 Next

PR#751

Peter Dalgaard BSA <p.dalgaard@biostat.ku.dk> writes:
Found and fixed. Unfortunately the code had just forgotten to test for
the case where you end with a zero-degree polynomial after zero-root
removal, so the fix has zero effect on the accuracy issue. 

The fix is simply 

--- src/appl/cpoly.c    2000/11/24 21:34:31     1.20
+++ src/appl/cpoly.c    2001/01/17 19:45:24
@@ -148,6 +148,8 @@
     nn++;
     /*-- Now, global var.  nn := #{coefficients} = (relevant degree)+1 */
 
+    if (nn == 1) return;
+
     /* make a copy of the coefficients and shr[] = | p[] | */
     for (i = 0; i < nn; i++) {
        pr[i] = opr[i];