fn determinant(matrix: &[Vec<f64>]) -> f64
Determinant via LU decomposition (in-place, partial pivoting).