How can I test for primality?

前端 未结 16 2174
南方客
南方客 2020-12-05 08:29

I am writing a little library with some prime number related methods. As I\'ve done the groundwork (aka working methods) and now I\'m looking for some optimization. Ofcours

16条回答
  •  粉色の甜心
    2020-12-05 08:47

    I posted a class that uses the sieve or Eratosthenes to calculate prime numbers here:

    Is the size of an array constrained by the upper limit of int (2147483647)?

提交回复
热议问题