diff --git a/.github/workflows/draft-pdf.yml b/.github/workflows/draft-pdf.yml index 55df8639..fd657949 100644 --- a/.github/workflows/draft-pdf.yml +++ b/.github/workflows/draft-pdf.yml @@ -13,7 +13,7 @@ jobs: journal: joss paper-path: paper.md - name: Upload - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: name: paper path: paper.pdf diff --git a/src/linalg/svd/bidiag_real_svd.rs b/src/linalg/svd/bidiag_real_svd.rs index c8048e95..054d2735 100644 --- a/src/linalg/svd/bidiag_real_svd.rs +++ b/src/linalg/svd/bidiag_real_svd.rs @@ -1224,13 +1224,15 @@ fn bidiag_svd_qr_algorithm_impl( } = self; let n = diag.len(); let arch = E::Simd::default(); + let epsilon2 = E::faer_mul(epsilon, epsilon); for iter in 0..max_iter { let _ = iter; for i in 0..n - 1 { - if subdiag[i].faer_abs() - <= epsilon.faer_mul(diag[i].faer_abs().faer_add(diag[i + 1].faer_abs())) - || subdiag[i].faer_abs() <= epsilon + if subdiag[i].faer_abs2() + <= epsilon2 + .faer_mul(E::faer_mul(diag[i].faer_abs(), diag[i + 1].faer_abs())) + + consider_zero_threshold { subdiag[i] = E::faer_zero(); } @@ -1242,8 +1244,7 @@ fn bidiag_svd_qr_algorithm_impl( } let mut end = n; - while end > 1 && subdiag[end - 2].faer_abs() <= consider_zero_threshold.faer_sqrt() - { + while end > 1 && subdiag[end - 2].faer_abs2() <= consider_zero_threshold { end -= 1; }