38# include <gtest/gtest.h>
43using namespace testing;
88 for (
unsigned long n = 0; n < 2000; ++n)
92 ASSERT_GE(p, n) <<
"next_prime(" << n <<
") = " << p <<
" < " << n;
96 for (
size_t i = 0; i < 200 && i <
numPrimes; ++i)
Main namespace for Aleph-w library functions.
DynList< T > maps(const C &c, Op op)
Classic map operation.
const unsigned long primeList[]
Pre-computed array of prime numbers for fast lookup.
const size_t numPrimes
Number of primes in the pre-computed database.
bool check_primes_database()
Verify the integrity of the prime database.
bool is_prime(unsigned long n)
Test if a number is prime using trial division.
size_t next_prime(unsigned long n)
Find the smallest prime number >= n from the database.
Prime number utilities for hash tables and mathematical operations.