#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 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?
I did most of my testing on mod.math and sage.math, which is ubuntu linux
(64-bit). I don't have failing results any longer, but I can tell you that
I discovered the issue with `10**16`, and I also know that it fails for
`9.75*10**15`. Give me 7-8 hours and I'll get you the output for those
inputs.
>
> While the old implementation was said to fail on (at least some) 32-bit
systems for large inputs, the new one in contrast fails on 64-bit systems?
I don't know how the new one behaves on 32-bit systems, since I have done
literally no testing. I hope it does better than the old one, since I used
stdint this time around (and the only real difference between my 64-bit vs
32-bit implementation is the use of pointers in the later).
>
> (More or less just curious; perhaps I'll ''one day''^TM^ try to track
this down, depending on the affected system(s) as well.)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11475#comment:9>
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.