pub fn logspace_sub_fn(lx: f64, ly: f64) -> f64
log(exp(lx) - exp(ly)), computed in log-space. Requires lx >= ly.