4 ms·
In J generating prime numbers is simply p:21, that gives you 79 which is the 21st prime number. It is so fast, I wonder what the algorithm behind it is. [0]:
by max_ 3y ago
In J generating prime numbers is simply p:21, that gives you 79 which is the 21st prime number.
It is so fast, I wonder what the algorithm behind it is.
[0]: https://code.jsoftware.com/wiki/Vocabulary/pco https://code.jsoftware.com/wiki/Vocabulary/pco
- jonahx 3y ago> I wonder what the algorithm behind it is. Noted in the details section of the link you provided: "Primality testing on numbers larger than (2^31) uses the probabilistic Miller-Rabin algorithm."
- noman-land 3y agoHow high can you go with this?
- max_ 3y agoI have J on my android phone, and the highest I could go was p: 100999999, the prime numbers is 2059519669