5 ms·
Hopefully you'd try another algorithm before you did that ;). Primality tests are one of the most highly understood and well documented areas of CS - trial div
by calpaterson 16y ago
Hopefully you'd try another algorithm before you did that ;). Primality tests are one of the most highly understood and well documented areas of CS - trial division has been obsolete since, what, 1640?
- btilly 16y ago... trial division has been obsolete since, what, 1640? Longer than that. The sieve of Eratosthenes is attributed to Eratosthenes, who lived from 276 BC to 195 BC.
- calpaterson 16y agoHah, this exact thing occurred to me lying in bed last night :)