pub fn simpsons38(f: impl Fn(f64) -> f64, a: f64, b: f64, n: usize) -> f64
Simpson’s 3/8 rule. n must be a multiple of 3; adjusted upward if not.