#11475: improve prime_pi (speedup + small fixes)
-----------------------------+----------------------------------------------
   Reporter:  rohana         |          Owner:  was                             
       Type:  enhancement    |         Status:  needs_review                    
   Priority:  major          |      Milestone:  sage-4.7.1                      
  Component:  number theory  |       Keywords:  primes, prime counting, prime_pi
Work_issues:                 |       Upstream:  N/A                             
   Reviewer:                 |         Author:  R. Andrew Ohana                 
     Merged:                 |   Dependencies:                                  
-----------------------------+----------------------------------------------

Comment(by leif):

 Replying to [comment:35 leif]:
 > Replying to [comment:33 rohana]:
 > > I am probably going to remove the bound flag and instead put a warning
 about larger values not being well tested if/when they are called.
 >
 > Yes, I also think we can or should drop any "artificial" limit now,
 though I must admit I haven't really looked at the code yet...

 Ah, I see, you already removed the restriction in patch v8 (and also added
 warnings w.r.t. seemingly "endless" computations, which I also wanted to
 suggest).

 There's a small typo in `__call__()`'s docstring (the `2**32` should read
 `2**64`):
 {{{
         This implementation uses unsigned 64-bit ints and thus does not
         support `x >= 2**32`::

             sage: prime_pi(2^64)
             Traceback (most recent call last):
             ...
             NotImplementedError: computation of prime_pi for x >= 2^64 is
 not implemented
 }}}

 Also, there's a mixture of both kinds of exponentiation operators (`^` and
 `**`) throughout the [doc]strings; I'm not sure if we shouldn't use just
 one notation.

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