@@ -19,7 +19,6 @@ AUTHORS:
19
19
include " sage/ext/interrupt.pxi"
20
20
include " sage/ext/stdsage.pxi"
21
21
include " sage/libs/pari/decl.pxi"
22
- include " sage/libs/pari/pari_err.pxi"
23
22
24
23
from sage.libs.gmp.all cimport *
25
24
from sage.libs.flint.types cimport *
@@ -182,13 +181,13 @@ cdef class FiniteFieldElement_flint_fq_nmod(FinitePolyExtElement):
182
181
elif isinstance (x, pari_gen):
183
182
x_GEN = (< pari_gen> x).g
184
183
185
- pari_catch_sig_on ()
184
+ sig_on ()
186
185
if gequal0(x_GEN):
187
186
fq_nmod_zero(self .val, self ._cparent)
188
- pari_catch_sig_off ()
187
+ sig_off ()
189
188
elif gequal1(x_GEN):
190
189
fq_nmod_one(self .val, self ._cparent)
191
- pari_catch_sig_off ()
190
+ sig_off ()
192
191
else :
193
192
t = typ(x_GEN)
194
193
p = self ._parent.characteristic()
@@ -197,18 +196,18 @@ cdef class FiniteFieldElement_flint_fq_nmod(FinitePolyExtElement):
197
196
if t == t_FFELT:
198
197
# The following calls pari_catch_sig_off()
199
198
x = (< PariInstance> pari).new_gen(FF_p(x_GEN))
200
- pari_catch_sig_on ()
199
+ sig_on ()
201
200
y = FF_f(x_GEN)
202
201
R = modulus.parent()
203
- pari_catch_sig_on ()
202
+ sig_on ()
204
203
z = R((< PariInstance> pari).new_gen(FF_mod(x_GEN)))
205
204
if x == p and y == f and z == modulus:
206
205
# The following calls pari_catch_sig_off()
207
206
x = (< PariInstance> pari).new_gen(FF_to_FpXQ(x_GEN))
208
207
self .construct_from(R(x))
209
208
return
210
209
elif t == t_INT:
211
- pari_catch_sig_off ()
210
+ sig_off ()
212
211
self .construct_from(Integer(x))
213
212
return
214
213
elif t == t_INTMOD:
@@ -224,7 +223,7 @@ cdef class FiniteFieldElement_flint_fq_nmod(FinitePolyExtElement):
224
223
self .construct_from(Rational(x))
225
224
return
226
225
else :
227
- pari_catch_sig_off ()
226
+ sig_off ()
228
227
raise TypeError (" no coercion defined" )
229
228
230
229
elif (isinstance (x, FreeModuleElement)
@@ -582,7 +581,7 @@ cdef class FiniteFieldElement_flint_fq_nmod(FinitePolyExtElement):
582
581
cdef fmpz_t exp_fmpz
583
582
inv = 0
584
583
if exp == 0 :
585
- return self ._parent.one_element ()
584
+ return self ._parent.one ()
586
585
if exp < 0 :
587
586
if fq_nmod_is_zero(self .val, self ._cparent):
588
587
raise ZeroDivisionError
@@ -866,9 +865,9 @@ cdef class FiniteFieldElement_flint_fq_nmod(FinitePolyExtElement):
866
865
867
866
sage: k.<a> = GF(3^17, impl='flint_fq_nmod')
868
867
sage: a._pari_init_()
869
- 'subst(a+3*a,a,ffgen(Mod(1, 3)*x ^17 + Mod(2, 3)*x + Mod(1, 3),a))'
868
+ 'subst(a+3*a,a,ffgen(Mod(1, 3)*a ^17 + Mod(2, 3)*a + Mod(1, 3),a))'
870
869
sage: k(1)._pari_init_()
871
- 'subst(1+3*a,a,ffgen(Mod(1, 3)*x ^17 + Mod(2, 3)*x + Mod(1, 3),a))'
870
+ 'subst(1+3*a,a,ffgen(Mod(1, 3)*a ^17 + Mod(2, 3)*a + Mod(1, 3),a))'
872
871
873
872
This is used for conversion to GP. The element is displayed
874
873
as "a" but has correct arithmetic::
0 commit comments