4 ms·
I assume the BigInteger library, which offers isPrime() and isProbablyPrime() functions, already does that kind of optimization.
by geonnave 9y ago
I assume the BigInteger library, which offers isPrime() and isProbablyPrime() functions, already does that kind of optimization.