Skip to content

passagemath/passagemath-primesieve-primecount

 
 

Repository files navigation

Cython interface to primecount (primecountpy fork)

This is a Cython interface to the C++ library primecount.

It is a compatible fork of primecountpy.

Quick installation and testing:

  1. Install primecount C++ library
cd /tmp/
git clone https://github.com/kimwalisch/primecount
cd primecount
cmake . -DBUILD_SHARED_LIBS=ON
make -j
sudo make install
sudo ldconfig # linux only
  1. in this repo, do
pip install . --user

python3 and

>>> import primecountpy as primecount
>>> primecount.prime_pi(1000)

More details on installation without root (sudo) access, and testing with pytest, may be found in the manual.

License

Distributed under the terms of the GNU General Public License (GPL) as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Packages

No packages published

Languages

  • Cython 75.0%
  • Python 25.0%