--- a/job66-anchored-pairs.js +++ b/job66-anchored-pairs.js @@ -71,7 +71,8 @@ const Delta0StarA=((sumA*sumA-sumB)/2)/P2a; // Σ_{idmaxA) dmaxA=d; } const t2A=-muA+DeltaA*Math.exp(2*dmaxA), t3A=-Math.min(muA*muA/(8*DeltaA), muA/(6*dmaxA), muA/2), t8A=1-Delta0StarA*Math.exp(DeltaStarA); - console.log(`\n@${x}: W=${W} N̄=${Nbar} y=${y} K=${K} events=${E} L0=${L0} R0=${R0} S0=${S0} (${((Date.now()-t0)/1000).toFixed(1)} s)`); + console.log(`\n@${x}: W=${W} N̄=${Nbar} y=${y} K=${K} events=${E} L0=${L0} R0=${R0} S0=${S0}`); + console.error(`@${x}: elapsed ${((Date.now()-t0)/1000).toFixed(1)} s`); console.log(` within-prime pairs ${within}, with nonzero joint count ${withinNonzero} (mutual exclusion holds iff 0)`); console.log(` cross-prime pairs ${cross}: exactly independent ${indep}; joint count zero ${zeroJoint}`); console.log(` prime pairs with q·q' ≤ W: ${smallProd} (×4 event pairs = ${4*smallProd}), of which exactly independent ${smallIndep}`); --- a/job66-sieve-prediction.py +++ b/job66-sieve-prediction.py @@ -23,7 +23,8 @@ if sieve[i]: sieve[i * i::2 * i] = False primes = np.flatnonzero(sieve).astype(np.int64) -print(f"sieve to {LIMIT} done in {time.time()-t0:.1f}s, pi({LIMIT}) = {len(primes)}") +print(f"pi({LIMIT}) = {len(primes)}") +print(f"sieve to {LIMIT} done in {time.time()-t0:.1f}s", file=sys.stderr) def pi_upto(n): # number of primes <= n return int(np.searchsorted(primes, n, side='right')) @@ -103,4 +104,4 @@ R0 = int(np.count_nonzero(sieve[comb + 2] & (comb + 2 > y))) print(f"x={x}: |N|={len(comb)} (N_bar={rows[x][3]}) L0={L0} (expected {L0_known[x]}) R0={R0} (expected {R0_known[x]})") -print(f"\ntotal time {time.time()-t0:.1f}s") +print(f"\ntotal time {time.time()-t0:.1f}s", file=sys.stderr)