Karim BELABAS on Mon, 18 Jan 1999 19:35:50 +0100 (MET)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: 2 bugs with pols in 2.0.12


[Igor:]
> On Sun, Jan 17, 1999 at 04:10:21PM -0500, Ilya Zakharevich wrote:
> > ? res=-23708160*x^9 - 225566208*x^8 - 1131314688*x^7 - 3968372736*x^6 - 7276863744*x^5 - 1112932224*x^4 + 22694392512*x^3 + 49279399488*x^2 + 50845741200*x + 22483386864;
> > ? polgalois(res)
> >   ***   segmentation fault: bug in GP (please report).
> > 
> > ? factornf(res,subst(res,x,y))
> >   ***   bug in subresext, please report
> > 
> > (The second message is triggered even if we do not do polgalois().)
> > 
> > Ilya
> 
> Can reproduce both with 2.0.12 on Solaris 2.6.  2.0.13 and later work
> fine.  
> 
> However, 2.0.13 exhibits another problem:
> 
> ? polredabs(res)
>   ***   incorrect type in discsr.

Easy to correct: nf structure was partly updated in nfnewprec (not needed
before polredabs rewrite in 2.0.12. Now we do need it...).

  Karim.

*** src/basemath/base1.c.orig   Mon Jan 18 18:35:40 1999
--- src/basemath/base1.c        Mon Jan 18 19:32:29 1999
***************
*** 1400,1414 ****
    p4=(GEN)nf[7]; p2=get_roots(pol,r1,ru,prec);
    p10 = make_M(n,ru,varn(pol),p4,p2);
    p5 = make_MC(n,r1,ru,p10);
!   if (nf_small) p7[1]=p7[2]=p7[4]=p7[5]=p7[6]=p7[7]=zero;
    else
    {
      GEN matrices=(GEN)nf[5];
      y[6]=(long)p2;
-     p7[1]=(long)p10;
      p7[2]=(long)p5;
      for (i=4; i<=7; i++) p7[i]=matrices[i];
    }
    p7[3]=lreal(gmul(p5,p10));
    tetpil=avma; return gerepile(av,tetpil,gcopy(y));
  }
--- 1400,1414 ----
    p4=(GEN)nf[7]; p2=get_roots(pol,r1,ru,prec);
    p10 = make_M(n,ru,varn(pol),p4,p2);
    p5 = make_MC(n,r1,ru,p10);
!   if (nf_small) p7[2]=p7[4]=p7[5]=p7[6]=p7[7]=zero;
    else
    {
      GEN matrices=(GEN)nf[5];
      y[6]=(long)p2;
      p7[2]=(long)p5;
      for (i=4; i<=7; i++) p7[i]=matrices[i];
    }
+   p7[1]=(long)p10;
    p7[3]=lreal(gmul(p5,p10));
    tetpil=avma; return gerepile(av,tetpil,gcopy(y));
  }

--
Karim Belabas                    email: Karim.Belabas@math.u-psud.fr
Dep. de Mathematiques, Bat. 425
Universite Paris-Sud             Tel: (00 33) 1 69 15 57 48
F-91405 Orsay (France)           Fax: (00 33) 1 69 15 60 19
--
PARI/GP Home Page: http://pari.home.ml.org