Category talk:Wren-math: Difference between revisions

m
→‎Source code: Minor change.
(→‎Source code: Replaced Int.primeCount with a much quicker version.)
m (→‎Source code: Minor change.)
Line 332:
// See https://rosettacode.org/wiki/Legendre_prime_counting_function for details.
static primeCount(n) {
if (n < 32) return (n < 2) ? 0 : 1
if (n < 9) return ((n + 1)/2).floor
var masks = [1, 2, 4, 8, 16, 32, 64, 128]
9,479

edits