# HG changeset patch # User Marco atzeri # Date 1314147534 14400 # Node ID 0413227e407bbd43afa588ad32771174ac6f599c # Parent 64378396e7a6eed6b2494e60f82911f3efbde534 dMatrix.cc: Fix tests introduced by changeset f217edac2c71. Declare variables Mt and rvt as shared, and increase tolerance for tests which fail on cygwin. diff --git a/liboctave/dMatrix.cc b/liboctave/dMatrix.cc --- a/liboctave/dMatrix.cc +++ b/liboctave/dMatrix.cc @@ -3111,18 +3111,17 @@ */ /* Test some simple identities -%!shared M, cv, rv +%!shared M, cv, rv, Mt, rvt %! M = randn(10,10)+100*eye(10,10); %! Mt = M'; %! cv = randn(10,1); -%! cvt = cv'; %! rv = randn(1,10); %! rvt = rv'; %!assert([M*cv,M*cv],M*[cv,cv],1e-14) -%!assert([M'*cv,M'*cv],M'*[cv,cv],1e-14) -%!assert([rv*M;rv*M],[rv;rv]*M,1e-14) -%!assert([rv*M';rv*M'],[rv;rv]*M',1e-14) -%!assert(2*rv*cv,[rv,rv]*[cv;cv],1e-14) +%!assert([M'*cv,M'*cv],M'*[cv,cv],3e-14) +%!assert([rv*M;rv*M],[rv;rv]*M,3e-14) +%!assert([rv*M';rv*M'],[rv;rv]*M',3e-14) +%!assert(2*rv*cv,[rv,rv]*[cv;cv],3e-14) %!assert(M'\cv,Mt\cv,1e-14) %!assert(M'\rv',Mt\rvt,1e-14) */