-
-
Notifications
You must be signed in to change notification settings - Fork 649
Description
The prime_pi
function is currently a symbolic function that can hold its argument as in
sage: n = SR.var('n')
sage: prime_pi(n)
prime_pi(n)
that also contains the Cython code for evaluating it
sage: prime_pi(13543)
1603
Unfortunately, it is buggy, see #24960 (fixed in #32894, using this ticket). We will promote the spkg primecount
to standard and use it instead. This ticket does this part, and reverts deprecations from #32412. It also removes obsolete deprecation warning, and the corresponding no longer available parameter.
Upstream patch: kimwalisch/primesieve#107 (rejected)
Below is the original part, no longer too relevant.
We move the evaluation part as a standalone function in arith/
and provide alternative implementations
- using
PARI/GP
(only efficient in the range of tabulated primes) - using the different algorithms in the library primecount that is packaged in package primecount 4.3 #24966
Upstream: Fixed upstream, but not in a stable release.
CC: @mkoeppe @miguelmarco @isuruf
Component: basic arithmetic
Author: Dima Pasechnik
Branch/Commit: b9b4eaf
Reviewer: Matthias Koeppe
Issue created by migration from https://trac.sagemath.org/ticket/25009