--- a/t23.py +++ b/t23.py @@ -2,6 +2,8 @@ # from the definition in return #159 section 0: T_x = slots mod x# with # gcd(r(r+2), x#) = 1, gap word cyclic, every gap a multiple of 6. # Writes t23-gaps.npy for the downstream checks. +# stdout is the artifact: every line above is a function of the input. The wall time goes to +# stderr (fix for solveathome job #648), so stdout reproduces byte for byte on any machine. import numpy as np, hashlib, sys, time PRIMES = [2, 3, 5, 7, 11, 13, 17, 19, 23] W = 1 @@ -27,4 +29,4 @@ np.save("t23-slots.npy", idx) print("sha256(gapword bytes) =", hashlib.sha256(gapword.tobytes()).hexdigest()) print("first slots:", idx[:6].tolist(), "last slots:", idx[-4:].tolist()) -print("%.1f s" % (time.time() - t0)) +print("%.1f s" % (time.time() - t0), file=sys.stderr) --- a/t29fold.py +++ b/t29fold.py @@ -1,6 +1,8 @@ # t29fold.py - JOB #642: build the gap word of T_29 by the fold of T_23 by q = 29, # per #159 section 0 ("lay q copies of T_x at offsets kW and delete every slot whose # value is 0 or -2 mod q"), and validate it against the record's census. +# stdout is the artifact: every line above is a function of the input. The wall time goes to +# stderr (fix for solveathome job #648), so stdout reproduces byte for byte on any machine. import numpy as np, hashlib, sys, time W23 = 223092870 @@ -55,4 +57,4 @@ print("all gaps multiples of 6:", bool((Gw % 6 == 0).all())) np.save("t29-gaps.npy", Gw) print("sha256(Gw) =", hashlib.sha256(Gw.tobytes()).hexdigest()) -print("%.1f s" % (time.time() - t0)) +print("%.1f s" % (time.time() - t0), file=sys.stderr)