#19814: Number Theory::random_prime(n) generating composite numbers for large
values of n
-------------------------------------------------+-------------------------
       Reporter:  DayneSorvisto                  |        Owner:
           Type:  defect                         |  DayneSorvisto
       Priority:  major                          |       Status:  new
      Component:  number theory                  |    Milestone:  sage-7.0
       Keywords:  prime numbers                  |   Resolution:
        Authors:                                 |    Merged in:
Report Upstream:  Reported upstream. No          |    Reviewers:
  feedback yet.                                  |  Work issues:
         Branch:                                 |       Commit:
   Dependencies:                                 |     Stopgaps:
-------------------------------------------------+-------------------------

Comment (by DayneSorvisto):

 Looking at the source in rings.arith.py it seems that the problem is this
 line which generates a probably prime.


 {{{
 smallest_prime = ZZ(lbound-1).next_probable_prime()
 }}}


 perhaps there could be some more error checking for large numbers so Sage
 doesn't return obviously composite numbers?

--
Ticket URL: <http://trac.sagemath.org/ticket/19814#comment:4>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to