3 ms·
Your review of the code was incorrect. The code tests primality with the ==1 check that you say is wrong. Why do you say that the output is wrong?
by IncRnd 9y ago
Your review of the code was incorrect. The code tests primality with the ==1 check that you say is wrong.
Why do you say that the output is wrong?
- ColinWright 9y agoI was wrong when I claimed the output would be wrong - see my comments here[0]. The output is correct, but the code is not the Sieve of Eratosthenes. I was misled by the expectation that it would be. [0] https://news.ycombinator.com/item?id=15410300 https://news.ycombinator.com/item?id=15410300
- IncRnd 9y agoGood point. The loop's upper-bound check differs. Thanks!