primecount
« Back to VersTracker
Description:
Fast prime counting function program and C/C++ library
Type: Formula  |  Latest Version: 7.20@0  |  Tracked Since: Dec 17, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: mathematics number-theory prime-numbers cli c++
Install: brew install primecount
About:
primecount is a command-line tool and C++ library for computing prime counting functions. It implements highly optimized algorithms like the combinatorial method and parallel segmented sieves to achieve fast performance on multi-core systems.
Key Features:
  • Parallel computation using OpenMP for multi-core performance
  • Supports multiple prime counting algorithms (Lagarias, Meissel, Lehmer)
  • Works with integers up to 10^27 on standard hardware
  • Provides both a CLI tool and a C++ library interface
Use Cases:
  • Mathematical research and number theory calculations
  • Benchmarking system performance with CPU-intensive workloads
  • Educational purposes for learning about prime number algorithms
Alternatives:
  • primesieve – primesieve focuses on generating prime numbers, while primecount specializes in counting them efficiently.
Version History
Detected Version Rev Change Commit
Dec 17, 2025 8:20pm 7.20 0 VERSION_BUMP 9927088f
Sep 15, 2025 7:11am 0 VERSION_BUMP f17153ee