Karim BELABAS on Wed, 20 Jan 1999 14:06:28 +0100 (MET) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: bug in nfsubfields() - revisited |
[Igor:] > > another one of post-2.0.11 bugs: > > > > ? nfisincl(x^2-2,x^4-2*x^2+9) > > [-1/6*x^3 + 5/6*x, 1/6*x^3 - 5/6*x] > > ? nfsubfields(nfinit(x^4-2*x^2+9),2) > > [] > > Even after the patch, nfsubfields() fails to work for some > polynomials. I came up with x^6 - 2*x^5 + 2*x^3 + 7*x^2 - 8*x + 13 > This one has index=533. > > So the pattern continues to be polynomials with cyclotomic subfield > and a high index ( last time it was index=24 ). [Later] > Actually, I found another polynomial, this time with a small index=16: > > ? nfsubfields(nfinit(x^4+3*x^2+16),2) > [] The bound was correct this time, except I was forgetting to make a final test when we reach it. Hopefully it is correct this time. This corrects the two examples above. Karim. *** src/modules/subfield.c.orig Fri Jan 8 11:42:07 1999 --- src/modules/subfield.c Wed Jan 20 14:02:19 1999 *************** *** 538,545 **** p1 = gneg(gmul(h0, poleval(g,w0))); w1 = gres(gmul(unmodp,gadd(w0,p1)), f); p2 = retrieve_p_adique_polynomial_in_Q(ind,w1); ! if (gegal(p2, w0_inQ) && gdivise(poleval(g, w0_inQ), f)) ! return gerepileupto(av, poleval(w0_inQ, gadd(polx[0],stoi(TR)))); if (DEBUGLEVEL>2) { fprintferr("Old Q-polynomial: "); outerr(w0_inQ); --- 538,545 ---- p1 = gneg(gmul(h0, poleval(g,w0))); w1 = gres(gmul(unmodp,gadd(w0,p1)), f); p2 = retrieve_p_adique_polynomial_in_Q(ind,w1); ! if ((gegal(p2, w0_inQ) || cmpii(p,maxp)) && gdivise(poleval(g,p2), f)) ! return gerepileupto(av, poleval(p2, gadd(polx[0],stoi(TR)))); if (DEBUGLEVEL>2) { fprintferr("Old Q-polynomial: "); outerr(w0_inQ); -- 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