An optimized algorithm to determine if any number is prime.
Any positive integer
true if n is prime
true
n
const b = SMath.isPrime(5); // true Copy
const b = SMath.isPrime(5); // true
An optimized algorithm to determine if any number is prime.