fn apply_q_flags(p: f64, lower_tail: bool, log_p: bool) -> f64
Pre-process a probability input for quantile functions: undo log.p and lower.tail.