pub fn least(
lo: u64,
hi: u64,
samples: u64,
refused: impl FnMut(u64) -> bool,
) -> Result<Least, Counterexample>Expand description
The least value in [lo, hi] that refused answers false for, by
bracketing (hi must be clear) and bisection, then checked at the
need’s adjacent values, at samples spaced values on each side and at
powers of two away from it.
§Errors
A Counterexample: hi refused, or a value whose answer is not the
need’s side’s.