2 ms·
I believe they actually have very optimized algorithms to test for primality [0], which not necessarily involve diving by every possible number. There are simp
by saganus 11y ago
I believe they actually have very optimized algorithms to test for primality [0], which not necessarily involve diving by every possible number.
There are simple tests and there are more complex ones, that use probabilities and other workarounds to avoid having to divide by every possible number.
[0] https://en.wikipedia.org/wiki/Primality_test https://en.wikipedia.org/wiki/Primality_test