#7013: [with patch, needs work] prime_pi and nth_prime
-----------------------------+----------------------------------------------
   Reporter:  kevin.stueve   |       Owner:  kevin.stueve            
       Type:  enhancement    |      Status:  needs_work              
   Priority:  major          |   Milestone:  sage-4.3                
  Component:  number theory  |    Keywords:  primes, sieve, table,LMO
Work_issues:                 |      Author:  Kevin Stueve            
   Upstream:  N/A            |    Reviewer:  was,robertwb,GeorgSWeber
     Merged:                 |  
-----------------------------+----------------------------------------------

Comment(by kevin.stueve):

 I noticed on line 506 of "sage/functions/prime_pi.pyx" in the patch that
 prime_pi(x) is capped at x=2**61 (2.30584301 × 10**18).  This is okay if
 the LMO code is used for the largest values of x.  However, without the
 LMO code being called in such cases, the table/sieving prime_pi will start
 to return incorrect values as soon as the li(x)-pi(x) values don't fit
 within three bytes (somewhere between 10**17 and 10**18, see my above post
 on this issue I made two months ago).
 The options are:[[BR]]-cap the allowed values of x so that li(x)-pi(x)
 will never exceed three bytes of space[[BR]] -modify the table to allow
 more than three bytes of storage when necessary[[BR]] -incorporate the LMO
 code for large values of x

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7013#comment:18>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.


Reply via email to