Timeline for Outputting prime numbers in given ranges
Current License: CC BY-SA 3.0
12 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 30, 2018 at 6:18 | comment | added | Martin R | @jackfield: Yes, it works with arbitrary many test cases. You can check the value of numTests if you want, but I don't find that necessary. | |
| Apr 29, 2018 at 21:30 | vote | accept | jackfield | ||
| Apr 29, 2018 at 20:58 | comment | added | jackfield | your algorithm allow more than 10 cases ? | |
| Apr 29, 2018 at 20:53 | vote | accept | jackfield | ||
| Apr 29, 2018 at 20:58 | |||||
| Apr 29, 2018 at 15:23 | comment | added | markspace | No worries. Your code and answer look great otherwise. | |
| Apr 29, 2018 at 15:22 | comment | added | Martin R | @markspace: You are right, there was an error in the calculation of the upper limit for the divisor check. Apparently I did not inspect the (initial) output carefully enough. Thank you for the feedback! | |
| Apr 29, 2018 at 15:20 | history | edited | Martin R | CC BY-SA 3.0 | Fixed off-by one error in square root limit (feedback from @markspace) |
| Apr 29, 2018 at 15:14 | comment | added | markspace | This is a great answer and well done. However I wonder if you tested the output. Specifically I think that isPrime() might wrongly identify 2 as not prime. Didn't test it, but that how it looks. I might be wrong. | |
| Apr 29, 2018 at 8:22 | history | edited | Martin R | CC BY-SA 3.0 | added 353 characters in body |
| Apr 29, 2018 at 8:16 | history | edited | Martin R | CC BY-SA 3.0 | added 353 characters in body |
| Apr 29, 2018 at 7:02 | history | edited | Martin R | CC BY-SA 3.0 | added 65 characters in body |
| Apr 29, 2018 at 6:53 | history | answered | Martin R | CC BY-SA 3.0 |