Gate

object Gate(source)

The per-trial fault gate. harness.sh and harness.ps1 compute the same integer function (--hash and -Hash print it), so the trials that fail are known before anything runs.

Functions

Link copied to clipboard
fun failures(trials: Int, salt: Long, gate: Int): List<Int>
Link copied to clipboard
fun fires(trial: Int, salt: Long, gate: Int): Boolean
Link copied to clipboard
fun hash(trial: Int, salt: Long): Long
Link copied to clipboard
fun within(trials: Int, rate: Int, count: Int): Boolean

True when count failures in trials stay within 2.5 standard deviations of the declared permille rate (4 d^2 <= 25 n a (1000 - a), exact in integers).