# HG changeset patch # User Ben Abbott # Date 1315088738 14400 # Node ID 4ffea87ad71b3425970d383e89359fde9820a897 # Parent 71ce008332e2cadaff40661eb4275b0720df1004 codesprint: Fix tolerance for qz.cc tests. diff -r 71ce008332e2 -r 4ffea87ad71b src/DLD-FUNCTIONS/qz.cc --- a/src/DLD-FUNCTIONS/qz.cc Sat Sep 03 15:23:47 2011 -0700 +++ b/src/DLD-FUNCTIONS/qz.cc Sat Sep 03 18:25:38 2011 -0400 @@ -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