making primecount (and its dependency primesieve) standard

84 views
Skip to first unread message

Dima Pasechnik

unread,
Nov 23, 2021, 5:26:44 AM11/23/21
to sage-devel
primecount is a popular C++ library of efficient procedures to
compute prime_pi(x), i.e. π(x),
number of prime numbers <=x, and related functions.
It's an optional package now. The repo is
https://github.com/kimwalisch/primecount

The default Sage implementation of prime_pi is buggy, and a very tricky and old
Cython code - see https://trac.sagemath.org/ticket/24960
Replacing it with the primecount implementation is the most direct way
to fix it, and it also
gives huge speedups. For this, primecount should be promoted from
optional to standard.
Primecount has a (vendored by default) dependency, a C++ library primesieve,
even more popular.
Many distros have primesieve as a separate package, so we'd like to split
primesieve off primecount, see https://trac.sagemath.org/ticket/25009

Any objections to this ?
(any objector volunteers to fix Sage's buggy prime_pi :-))

Thanks,
Dima

PS. in the modularization effort, the Cython interface to primecount will become
a separate PyPI package, work in progress on this is on
https://github.com/dimpase/primecountpy




.

Vincent Delecroix

unread,
Nov 23, 2021, 5:31:19 AM11/23/21
to sage-...@googlegroups.com
+1 for using standard and efficient libraries instead of slow and
buggy sage implementations :-)

Thanks
Vincent

mmarco

unread,
Nov 23, 2021, 6:30:40 AM11/23/21
to sage-devel
+1

Emmanuel Charpentier

unread,
Nov 24, 2021, 3:23:14 PM11/24/21
to sage-devel
+1, of course...

Samuel Lelievre

unread,
Nov 25, 2021, 2:32:10 AM11/25/21
to sage-devel
+1

Travis Scrimshaw

unread,
Nov 26, 2021, 1:41:17 AM11/26/21
to sage-devel
+1

On Thursday, November 25, 2021 at 4:32:10 PM UTC+9 Samuel Lelievre wrote:
+1
Reply all
Reply to author
Forward
0 new messages