pub fn adaptive_simpson( f: impl Fn(f64) -> f64, a: f64, b: f64, tol: f64, max_depth: usize, ) -> f64
Adaptive Simpson’s rule with recursive subdivision.