#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:16 rohana]:
> Replying to [comment:8 leif]:
> > Andrew, do you have some examples of wrong prime counts (beyond
2^49^), and if so, on what kind of systems does one experience them?
>
{{{
sage: time prime_pi(9.75*10**15)
272450165623660
Time: CPU 25614.37 s, Wall: 25614.47 s
}}}
>
> The correct value is `272450167482953`
(http://www.ieeta.pt/~tos/primes.html). I also computed `prime_pi(10**16)`
but in a moment of confusion, I killed the process before I grabbed the
value. If you want it I can start running it again with my current version
of the code (~3-5% faster than the latest patch).
Never mind. I thought you had collected a bunch of false results during
development. If (apparently) all platforms are affected, it should be
easier to track this down - rather than flaws due to e.g. Apple
"specifics"... ;-)
Btw, I have a large collection of correct prime counts here, so if
eventually the sysloads drop, I'll by myself check some results against
your new implementation.
Anyway, anybody feel free to compute more values above our current limit
and post them here, whether correct or not. :-)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11475#comment:17>
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.