#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:33 rohana]:
> I have verified that `prime_pi` gives correct output for `i*10**12` with
`0 <= i <= 1000` on x86_64 :).
Besides a couple of other values on individual machines, I've successfully
computed pi(2^k^) for k=0...53 and pi(10^k^) for k=0...16 on each of three
different machines (two of them 32-bit; all with patch ''version 6'').
Some computations are still in progress, but so far I could also verify
the results of `prime_pi(2**54)` and `prime_pi(2**55)` (on at least one
machine). I've also played a little with "`legendres_formula()`".
[[BR]]
> 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...
----
I wonder if `legendres_formula()` shouldn't be renamed to `legendre_phi()`
- better names appreciated, but the latter ( \phi(x,a) ) seems to be quite
established in literature, and `legendre_phi` would be analogous to e.g.
`euler_phi` in Sage. (I know Wolfram and others call "it" - i.e., IMHO the
method computing the respective function rather than the function itself -
''Legendre's Formula'' as well, but it's not that unambiguous.)
I'd also mention in its docstring it's called the ''partial sieve
function''.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11475#comment:35>
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.