Karim BELABAS on Tue, 9 Mar 1999 11:34:54 +0100 (MET)


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

Re: pari-2.0.14 bugs (smallbuchinit)


[I wrote: (pari-dev-466)]
> Bad input: a monic polynomial is expected. Another cosmetic patch to
> avoid the SEGV.

Apparently the patch got mangled in some way; I'm resending it.

   Karim.

*** src/basemath/buch2.c.orig	Tue Mar  9 11:17:10 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/