Karim BELABAS on Mon, 8 Mar 1999 18:43:33 +0100 (MET)


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

Re: pari-2.0.14 bugs


[Igor:]
> 5) bnfinit(polzagier(4,0),3)				\\ SEGV

Bad input: a monic polynomial is expected. Another cosmetic patch to avoid
the SEGV.

Karim.

*** src/basemath/buch2.c.orig	Fri Mar  5 08:51:44 1999
--- src/basemath/buch2.c	Mon Mar  8 17:27:33 1999
***************
*** 2055,2061 ****
    GEN y,bnf,pfb,vp,nf,mas,res,uni,v1,v2,v3;
  
    if (typ(pol)==t_VEC) bnf = checkbnf(pol);
!   else bnf=buchall(pol,gcbach,gcbach2,gRELSUP,gborne,nbrelpid,minsfb,-3,prec);
    pfb=(GEN)bnf[5]; vp=(GEN)bnf[6]; nf=(GEN)bnf[7];
    mas=(GEN)nf[5]; res=(GEN)bnf[8]; uni=(GEN)res[5];
  
--- 2055,2069 ----
    GEN y,bnf,pfb,vp,nf,mas,res,uni,v1,v2,v3;
  
    if (typ(pol)==t_VEC) bnf = checkbnf(pol);
!   else
!   {
!     bnf=buchall(pol,gcbach,gcbach2,gRELSUP,gborne,nbrelpid,minsfb,-3,prec);
!     if (checkbnf(bnf) != bnf)
!     {
!       err(warner,"non-monic polynomial. Change of variables discarded");
!       bnf = (GEN)bnf[1];
!     }
!   }
    pfb=(GEN)bnf[5]; vp=(GEN)bnf[6]; nf=(GEN)bnf[7];
    mas=(GEN)nf[5]; res=(GEN)bnf[8]; uni=(GEN)res[5];
--
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://hasse.mathematik.tu-muenchen.de/ntsw/pari/