Message361101
is_prime that's always correct is probably not the right thing to go into math. Besides, now we have isqrt, it's just
n>1 and n&1 and all(n%d for d in range(3,isqrt(n)+1,2))
-- yes, it's damn slow, but so is everything else you want to be absolutely correct. :-]
is_probable_prime is another matter, but there is an enormous amount of bikeshedding about the API of that one. |
|
Date |
User |
Action |
Args |
2020-01-31 12:15:37 | veky | set | recipients:
+ veky, lemburg, tim.peters, rhettinger, mark.dickinson, vstinner, stutzbach, steven.daprano, serhiy.storchaka, Ananthakrishnan |
2020-01-31 12:15:37 | veky | set | messageid: <1580472937.77.0.880294060551.issue39479@roundup.psfhosted.org> |
2020-01-31 12:15:37 | veky | link | issue39479 messages |
2020-01-31 12:15:37 | veky | create | |
|