Mercurial > octave
changeset 32206:fe178c793ea0 stable
pcg.m: Use eps tolerance in BIST test for ishermitian (Bug #63787)
* pcg.m: Use "ishermitian (x, eps)" to test for Hermitian property in BIST
tests.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 18 Jul 2023 14:07:32 -0700 |
parents | 19e4617fbc40 |
children | b73ebf017461 |
files | scripts/sparse/pcg.m |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/sparse/pcg.m Wed Jul 12 09:18:37 2023 -0700 +++ b/scripts/sparse/pcg.m Tue Jul 18 14:07:32 2023 -0700 @@ -616,8 +616,8 @@ %! b = A * ones (N, 1); %! M2 = chol (A + 0.1 * eye (N)); # Factor of a perturbed matrix %! M = M2' * M2; -%! Hermitian_A = ishermitian (A); -%! Hermitian_M = ishermitian (M); +%! Hermitian_A = ishermitian (A, eps); # AVX optimization can cause matrix +%! Hermitian_M = ishermitian (M, eps); # to miss being Hermitian by eps. %! [x, flag] = pcg (A, b, [], 2*N, M); %! assert (Hermitian_A, true); %! assert (Hermitian_M, true);