Jump to content

Legendre prime counting function: Difference between revisions

→‎Iterative, partial sieving: Changed 2 variable names to align with V of which it is a translation.
(→‎Iterative, partial sieving: Changed two variable names to align with V of which it is a translation.)
(→‎Iterative, partial sieving: Changed 2 variable names to align with V of which it is a translation.)
Line 3,314:
var nri = 0
for (ori in 0...rilmt) {
var qr = roughs[ori]
var pirci = qr >> 1
if ((cullbuf[pirci >> 3] & masks[pirci & 7]) != 0) continue
var d = qr * bp
var t = (d <= rtlmt) ? larges[smalls[d >> 1] - nbps] :
smalls[half.call(Int.quo(n, d))]
larges[nri] = larges[ori] - t + nbps
roughs[nri] = qr
nri = nri + 1
}
9,483

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.