| Karim BELABAS on Mon, 8 Sep 2003 13:57:58 +0200 (MEST) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: nfeltpowmodpr segfault on degree-1 ideals |
On Mon, 8 Sep 2003, Bill Allombert wrote:
> Dear PARI dev
>
> It seems that nfeltpowmodpr SEGV on degree 1 ideal:
> ? K=nfinit(x^2+1);pr=nfmodprinit(K,idealprimedec(K,5)[1]);
> ? nfeltpowmodpr(K,x,2,pr);
> *** bug in GP (Segmentation Fault), please report
>
> For some reason to_ff_init return NULL for the polynomial,
> but FpXQ_pow will not handle it.
All FpXQxxx(..., T,p) routines [ computations with lifted elements of
Fp[X]/(T) ] were supposed to handle the case of prime fields [ T = NULL ].
For some reason, this one did not...
Fixed.
Karim.
P.S: the nf*modpr routines are obsolete and simple GP wrappers around more
useful library routines, retained for backward compatibility since there's no
GP interface to work efficiently in finite fields.
Basically, it's a waste to work in O_K / pr [ "dimension n" ], rather than
directly in the isomorphic finite field [ "dimension f(pr/p) ].
nf_to_ff / ff_to_nf provide the required conversions routines, which should
only be used once [ the wrappers use them in the obvious way... ]
P.S2: there was some problems with the precise specifications of the
"modular" routines, e.g
* are t_INT allowed as representants for elements in polynomial quotient rings
(currently "often". Fqxxx routines should be used instead but...).
* does omitting an argument (p = NULL or T = NULL) corresponds to cancelling
the reduction (mod p or mod T), or does T = NULL correspond to the more
specific case of a prime field. The latter is more useful since one can
suppress the reduction mod p to work in char. 0 quotient rings R[X] / (T),
whereas there's no reason to use a FpXQ routine and to suppress reduction
mod T.
Since the routines are not yet documented, it would be a good idea to decide
once and for all.
--
Karim Belabas Tel: (+33) (0)1 69 15 57 48
Dép. de Mathématiques, Bât. 425 Fax: (+33) (0)1 69 15 60 19
Université Paris-Sud http://www.math.u-psud.fr/~belabas/
F-91405 Orsay (France) http://www.parigp-home.de/ [PARI/GP]