Mercurial > hg > octave-terminal
changeset 13088:4ffea87ad71b
codesprint: Fix tolerance for qz.cc tests.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Sat, 03 Sep 2011 18:25:38 -0400 |
parents | 71ce008332e2 |
children | 87015276d625 |
files | src/DLD-FUNCTIONS/qz.cc |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/DLD-FUNCTIONS/qz.cc +++ b/src/DLD-FUNCTIONS/qz.cc @@ -1256,10 +1256,12 @@ %! b = reshape(1:9,3,3); %! [aa, bb, q, z, v, w, lambda] = qz (a, b); %! sz = length(lambda); -%! assert ( (a*v) (:, 1:sz), (b * v * diag ([lambda;0])) (:, 1:sz), 1e-14); -%! assert ( (w'*a) (1:sz, :) , (diag ([lambda;0]) * w' * b) (1:sz, :), 1e-14); -%! assert (q * a * z, aa, 1e-14); -%! assert (q * b * z, bb, 1e-14); +%! observed = (b * v * diag ([lambda;0])) (:, 1:sz); +%! assert ( (a*v) (:, 1:sz), observed, norm (observed) * 1e-14); +%! observed = (diag ([lambda;0]) * w' * b) (1:sz, :); +%! assert ( (w'*a) (1:sz, :) , observed, norm (observed) * 1e-13); +%! assert (q * a * z, aa, norm (aa) * 1e-14); +%! assert (q * b * z, bb, norm (bb) * 1e-14); %% FIXME: Still need a test for third form of calling qz