Karim BELABAS on Sat, 25 Aug 2001 19:21:37 +0200 (MEST)


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

Re: nfsubfields() bug


On Fri, 13 Jul 2001, Igor Schein wrote:
> ? p=x^10 - 386*x^9 + 57634*x^8 - 1013722*x^7 + 5519009*x^6 - 6234928*x^5 +
> 4790609*x^4 + 376538*x^3 + 65170*x^2 + 82*x + 1;
> ? nfsubfields(nfinit(p),5)
> []
> ? nfsubfields(nfinit(polredabs(p)),5)
> [[x^5 - 7*x^4 + 63*x^3 - 301*x^2 + 1080*x - 900, -x^2 + 1]]

This is a typo when computing Mignote bound for the size of polynomials
defining possible subfields. Thus in borderline cases, subfields could be
missed.  The following patch [applies to 2.1.0 or 2.2.0] fixes it.

  Karim.

*** src/modules/subfield.c      2000/11/03 21:00:29     1.7
--- src/modules/subfield.c      2001/08/25 00:17:35     1.7.2.1
***************
*** 680,687 ****
    M = cgetg(m+2, t_VEC); M[1]=M[2]=zero; /* unused */
    for (i=1; i<m; i++)
    {
!     p1 = gadd(gmul(gcoeff(C, m, i), B),
!               gcoeff(C, m, i+1));
      M[i+2] = lceil(p1);
    }
    return M;
--- 680,687 ----
    M = cgetg(m+2, t_VEC); M[1]=M[2]=zero; /* unused */
    for (i=1; i<m; i++)
    {
!     p1 = gadd(gmul(gcoeff(C, m, i+1), B),
!               gcoeff(C, m, i));
      M[i+2] = lceil(p1);
    }
    return M;

-- 
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://www.parigp-home.de/