| Karim BELABAS on Wed, 20 Jan 1999 14:12:51 +0100 (MET) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: another nfgaloisconj() problem |
[Igor:]
> nfgaloisconj() can't handle linear polynomials in post-2.0.11 version.
> For example, nfgaloisconj(nfinit(x+1)) hits an infinite SEGV loop.
Actually a conjunction of 2 fatal, obscure and completely unrelated bugs
(unrelated to nfgaloisconj or nfinit also...).
You're an invaluable tester, Igor !
Karim.
*** src/basemath/base1.c.orig Wed Jan 20 13:09:57 1999
--- src/basemath/base1.c Wed Jan 20 13:29:46 1999
*** src/basemath/polarit1.c.orig Fri Jan 8 19:20:36 1999
--- src/basemath/polarit1.c Wed Jan 20 13:37:43 1999
***************
*** 476,483 ****
if (i == 2) j = 1;
else
{
! a = f + i-2; a[1] = f[1]; a[0] = f[0];
! setlgef(a, lgef(f) - (i-2)); /* a = f / x^{v_x(f)} */
j = 2; f = a;
}
q = shifti(p,-1);
--- 476,485 ----
if (i == 2) j = 1;
else
{
! j = lgef(f) - (i-2);
! a = cgetg(j, t_POL); /* a = f / x^{v_x(f)} */
! a[1] = evalsigne(1) | evalvarn(varn(f)) | evallgef(j);
! f += i-2; for (i=2; i<j; i++) a[i]=f[i];
j = 2; f = a;
}
q = shifti(p,-1);
*** src/basemath/polarit3.c.orig Tue Dec 15 16:29:54 1998
--- src/basemath/polarit3.c Wed Jan 20 13:44:44 1999
***************
*** 260,265 ****
--- 260,266 ----
long m,i,j,av=avma, lim=(av+bot)>>1, vx = varn(x);
GEN p1 = n+2, y = x, z;
if (!signe(n)) return polun[vx];
+ if (is_pm1(n)) return gcopy(x);
m = *p1;
j=1+bfffo(m); m<<=j; j = BITS_IN_LONG-j;
for (i=lgefint(n)-2;;)
--
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