pub fn expit(x: f64) -> f64
The logistic sigmoid 1 / (1 + e^{−x}), evaluated so that neither branch overflows.
1 / (1 + e^{−x})