Legendre prime counting function: Difference between revisions
m
→{{header|C}}: Aligned with VLang.
m (→Iterative, partial sieving: Aligned with VLang.) |
m (→{{header|C}}: Aligned with VLang.) |
||
Line 54:
int64_t countPrimes(uint64_t n) {
if (n <
uint64_t rtlmt = (uint64_t)sqrt((double)n);
int64_t mxndx = (int64_t)((rtlmt - 1) / 2);
|