pub fn safe_dot_product(a: &[f64], b: &[f64]) -> Option<f64>
Safe wrapper for dot product with bounds checking