From 80a844a3bf7a2fd72eb2272b57f6a451c2fabee7 Mon Sep 17 00:00:00 2001 From: metric-space Date: Sat, 16 Apr 2022 02:23:38 -0400 Subject: [PATCH] Update check for zero --- nalgebra-lapack/src/generalized_eigenvalues.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nalgebra-lapack/src/generalized_eigenvalues.rs b/nalgebra-lapack/src/generalized_eigenvalues.rs index db758332..69e5e465 100644 --- a/nalgebra-lapack/src/generalized_eigenvalues.rs +++ b/nalgebra-lapack/src/generalized_eigenvalues.rs @@ -234,10 +234,8 @@ where let mut c = 0; - let epsilon = T::RealField::default_epsilon(); - while c < n { - if eigenvalues[c].0.im.abs() > epsilon && c + 1 < n { + if eigenvalues[c].0.im.abs() != T::RealField::zero() && c + 1 < n { // taking care of the left eigenvector matrix l.column_mut(c).zip_apply(&self.vsl.column(c + 1), |r, i| { *r = Complex::new(r.re.clone(), i.clone());