pub fn norm2<T>(a: &[T]) -> Twhere T: Float + Sum<T> + Mul<T, Output = T>,
Calculate the 2-norm of a vector