#9401: pari(n).isprime(1) does not give the primality certificate to the user
------------------------------------+--------------------------
       Reporter:  zimmerma          |        Owner:  AlexGhitza
           Type:  defect            |       Status:  needs_work
       Priority:  major             |    Milestone:  sage-5.13
      Component:  basic arithmetic  |   Resolution:
       Keywords:  prime number      |    Merged in:
        Authors:                    |    Reviewers:
Report Upstream:  N/A               |  Work issues:
         Branch:                    |       Commit:
   Dependencies:                    |     Stopgaps:
------------------------------------+--------------------------
Changes (by pbruin):

 * status:  needs_review => needs_work


Comment:

 In principle OK, but needs to be rebased on #15124.

 Also, it would be much cleaner to call `new_gen()` instead of initialising
 the `gen` and resetting the stack by hand:
 {{{
 #!python
 cdef GEN x
 pari_catch_sig_on()
 x = gisprime(self.g, flag)
 if typ(x) != t_INT:
     # case flag=1 with prime input: x is the certificate
     return True, P.new_gen(x)
 else:
     pari_catch_sig_off()
     return bool(signe(x))
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/9401#comment:7>
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