#5130: [with patch; needs work] create a prime_pi function that doesn't just
compute len(prime_range(n))
---------------------------+------------------------------------------------
 Reporter:  was            |       Owner:  was       
     Type:  defect         |      Status:  new       
 Priority:  major          |   Milestone:  sage-3.4.2
Component:  number theory  |    Keywords:            
---------------------------+------------------------------------------------

Comment(by robertwb):

 It would be good to include a reference to the algorithm, and perhaps a
 bit more documentation in the code itself. For example, what is mem_mult
 or m_max?

 Maybe a the docstring should have an example of computing
 len(prime_range(...)) to show more explicitly what it's computing.

 The second line of {{{prime_phi_large}}}, no need to write {{{long(N)}}},
 just write N.

 I'm not sure what's going on here, but it's not deterministic.

 {{{
 sage: for n in range(90000, 100000, 3):
 ....:     if prime_pi(n) != len(prime_range(n+1)):
 ....:         print n, prime_pi(n), len(prime_range(n+1));
 ....:
 91587 8855 8855
 91848 8878 8875
 92112 8899 8896
 92373 8924 8921
 92376 8921 8921
 92637 8947 8945
 92901 8979 8976
 92904 8976 8976
 93171 8999 8999
 ...
 }}}

 (This is on an OS X 10.4 intel.)

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5130#comment:13>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel

--~--~---------~--~----~------------~-------~--~----~
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