isPrime

Millar-Rabin Test

bool
isPrime
(
ulong n
)

Examples

assert(!isPrime(0));
assert(!isPrime(1));
assert(isPrime(2));
assert(isPrime(10^^9 + 7));

Meta