pub fn agg_sum_f64(data: &[f64], segments: &[(usize, usize)]) -> Vec<f64>
Kahan-stable sum over contiguous segments.