pub fn mean(data: &[f64]) -> f64
Compute the mean of a slice of values.
Returns 0.0 for an empty slice.