Karim BELABAS on Tue, 19 Jan 1999 10:54:49 +0100 (MET)


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

Re: nfgaloisconj() bug


[Igor:]
> the following is reproducible under Solaris with all post-2.0.11
> versions:  
> 
> ? nfgaloisconj(nfinit(x^3-x-1))
>   ***   bus error: bug in GP (please report).

A typo which (in your case) asserted (x+1) == x ...

  Karim.

*** src/basemath/base1.c.orig   Mon Jan 18 18:35:40 1999
--- src/basemath/base1.c        Tue Jan 19 10:52:13 1999
***************
*** 607,613 ****
    if (lgef(f) != n) { avma=av; return 0; }
    z = Fp_pow_mod_pol(polx[varn(f)], p, f, p);
    /* x^p = x mod (f(x),p) ? */
!   avma = av; return lgef(z)==4 && gcmp1((GEN)z[3]);
  }
  
  static GEN
--- 607,613 ----
    if (lgef(f) != n) { avma=av; return 0; }
    z = Fp_pow_mod_pol(polx[varn(f)], p, f, p);
    /* x^p = x mod (f(x),p) ? */
!   avma = av; return lgef(z)==4 && gcmp1((GEN)z[3]) && !signe(z[2]);
  }
  
  static GEN

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