Karim Belabas on Fri, 05 Dec 2014 17:17:31 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Problem with Flx_ffisom function |
Hi, * Jean-Pierre Flori [2014-12-05 17:03]: > The following programs errors out claiming that the produced > irreducible polynomial is not anymore > (*** not an irreducible polynomial in FpX_ffintersect): > > #include <stdlib.h> > #include <stdio.h> > #include <time.h> > > #include <pari/pari.h> > > int main (int argc, char **argv) > { > int i; > unsigned long l; > long n, v; > GEN p, f, r; > > pari_init(1<<30, 1UL<<20); > > v = 0L; > > l = unextprime(1UL<<20); > p = stoi(l); > n = 179L; > f = init_Fq(p, n, v); > i = Flx_is_irred(ZX_to_Flx(f, l), l); ^^^^^^^^^^^^^^^ > pari_printf("%d\n", i); > > t = clock(); ^^^^^^^^^^^^ [ I'd declare t ... ] > /* > The following works fine. > */ > r = FpX_ffisom(f, f, p); > pari_printf("%Ps\n", r); > /* > This errors out > */ > r = Flx_ffisom(f, f, l); I'd apply Flx_ffisom to a Flx, as correctly done above. Not to the original FpX. After f = ZX_to_Flx(f,l) (and declaring clock_t t) the code above works fine. > Thanks in advance for the support! You're welcome :-) K.B. -- Karim Belabas, IMB (UMR 5251) Tel: (+33) (0)5 40 00 26 17 Universite de Bordeaux Fax: (+33) (0)5 40 00 69 50 351, cours de la Liberation http://www.math.u-bordeaux1.fr/~kbelabas/ F-33405 Talence (France) http://pari.math.u-bordeaux1.fr/ [PARI/GP] `