#14888: Make FiniteField_pari_ffelt the default for generic finite fields
-------------------------------------+-------------------------------------
       Reporter:  pbruin             |        Owner:  cpernet
           Type:  enhancement        |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-5.13
      Component:  finite rings       |   Resolution:
       Keywords:  FiniteField        |    Merged in:
  performance                        |    Reviewers:  Jean-Pierre Flori,
        Authors:  Peter Bruin        |  Jeroen Demeyer
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
   Dependencies:  #12142, #15124,    |     Stopgaps:
  #15125                             |
-------------------------------------+-------------------------------------

Comment (by pbruin):

 Here is one more guess: in
 `sage/rings/finite_rings/element_pari_ffelt.pyx` the Python int `x` is
 first converted into a PARI t_INT as follows (lines 209-210):
 {{{
 pari_catch_sig_on()
 x_GEN = (<pari_gen>pari(x)).g
 }}}
 The order of these two lines should be interchanged.

 Before #15125, the second line was `x_GEN = stoi(x)`; here
 `pari_catch_sig_on()` must be called first since we call the un-wrapped
 PARI function.  However, now we call `pari(x)`, which does its own
 `pari_catch_sig_on()...pari_catch_sig_off()`.  As we know, the current
 error-handling code is non-reentrant.  I don't see exactly how this could
 cause our bug, but maybe my imagination is too limited.

 There is a similar mistake in the `__pow__` method in the same file.

--
Ticket URL: <http://trac.sagemath.org/ticket/14888#comment:30>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to