Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
primality.H File Reference

Advanced primality testing algorithms. More...

#include <cstdint>
#include <initializer_list>
#include <modular_arithmetic.H>
Include dependency graph for primality.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Aleph
 Main namespace for Aleph-w library functions.
 
namespace  Aleph::detail
 

Functions

bool Aleph::detail::check_composite (uint64_t n, uint64_t a, uint64_t d, int s) noexcept
 Helper function for Miller-Rabin test.
 
bool Aleph::miller_rabin (uint64_t n) noexcept
 Miller-Rabin primality test for 64-bit integers.
 

Detailed Description

Advanced primality testing algorithms.

Provides a robust 64-bit Miller-Rabin primality test using a deterministic set of bases to ensure 100% correctness for all 64-bit integers.

Definition in file primality.H.