Karim BELABAS on Tue, 6 Apr 1999 17:09:20 +0200 (MET DST)


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

Re: polrootspadic()


[Igor:]
> I noticed the following:
> 
> \\ 2.0.11.beta
> 
> ? polrootspadic(x^8-x^7+29*x^2+29,2,10) 
> [1 + 2 + 2^3 + 2^4 + 2^5 + 2^6 + 2^7 + 2^8 + O(2^10)]
> 
> \\ 2.0.12.alpha and later
> 
> ? polrootspadic(x^8-x^7+29*x^2+29,2,10)
>   ***   root does not exist in rootpadic
> 
> Which one is correct?

The former [when computing roots mod 4, cases -1 and +1 had been switched]

   Karim.

*** src/basemath/polarit1.c.orig        Wed Mar 31 18:52:40 1999
--- src/basemath/polarit1.c     Tue Apr  6 17:07:00 1999
***************
*** 399,406 ****
    for (no=0,i=3; i<lgef(f); i+=2)
      if (signe(f[i])) no += mael(f,i,2);
    no &= 3; ne &= 3;
!   z1 = (no == ne);
!   z3 = (no == ((4-ne)&3));
    y=cgetg(1+z0+z1+z2+z3,t_VEC); i = 1; p = stoi(4);
    if (z0) y[i++] = (long)mods(0,p);
    if (z1) y[i++] = (long)mods(1,p);
--- 399,406 ----
    for (no=0,i=3; i<lgef(f); i+=2)
      if (signe(f[i])) no += mael(f,i,2);
    no &= 3; ne &= 3;
!   z3 = (no == ne);
!   z1 = (no == ((4-ne)&3));
    y=cgetg(1+z0+z1+z2+z3,t_VEC); i = 1; p = stoi(4);
    if (z0) y[i++] = (long)mods(0,p);
    if (z1) y[i++] = (long)mods(1,p);

__
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/