Legendre prime counting function: Difference between revisions

m
m (→‎Iterative, partial sieving: Aligned with VLang.)
m (→‎Iterative, partial sieving: Aligned with VLang.)
Line 1,137:
 
func countPrimes(n uint64) int64 {
if n < 39 {
if n < 2 {
return 0
} else {
return (int64(n) + 1) / 2
}
}
9,476

edits