Karim BELABAS on Wed, 17 Mar 1999 16:06:30 +0100 (MET)

 Re: another factorff() bug?

```[Igor:]
> the following hits what appears to be an infinite loop:
>
> factorff(x^3-x-1,11,y^2-y-1)

(15:59) gp > factormod(y^2-y-1, 11)
%1 =
[Mod(1, 11)*y + Mod(3, 11) 1]

[Mod(1, 11)*y + Mod(7, 11) 1]

factorff doesn't know how to factor over etale algebras. It assumes it is
working over a field.

>From the help:
factorization  in  the  field  F_q defined by the irreducible polynomial a
^^^^^^^^^^^
over F_p

> Also, I noticed this:
>
> ? ffinit(nextprime(2^31),2)
>   ***   impossible assignment I-->S
>
> I would guess the C-int limit on primes in ffinit() and factorff() is
> there on purpose, but I don't see it mentioned anywhere in the manual.

I added a note there. After the following cosmetic patch, one gets:

(16:02) gp > ffinit(nextprime(2^32), 2)
***   prime field too big in ffinit.

Karim.

*** src/modules/subfield.c.orig Fri Mar  5 08:52:43 1999
--- src/modules/subfield.c      Wed Mar 17 15:39:48 1999
***************
*** 794,799 ****
--- 794,800 ----
GEN pol,fpol;

if (n<=0) err(talker,"non positive degree in ffinit");
+   if (is_bigint(p)) err(talker,"prime field too big in ffinit");
if (v<0) v = 0;
av=avma; pp=itos(p); pol = cgetg(n+3,t_POL);
pol[1] = evalsigne(1)|evalvarn(v)|evallgef(n+3);

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