pub fn invert(f: impl Fn(f64) -> f64, p: f64, lo: f64, hi: f64) -> f64
The x in lo..hi where a non-decreasing f reaches p (the smallest such x), by bisection.
lo..hi
f
p