Mercurial > hg > octave-terminal
changeset 12917:d6209c354667
Change test on sqrtm.cc to use any when checking for NaN
author | Jordi Gutiérrez Hermoso <jordigh@gmail.com> |
---|---|
date | Thu, 04 Aug 2011 00:42:31 -0500 |
parents | 5d0478a75618 |
children | 61906c0d1e9b |
files | src/DLD-FUNCTIONS/sqrtm.cc |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/DLD-FUNCTIONS/sqrtm.cc +++ b/src/DLD-FUNCTIONS/sqrtm.cc @@ -259,13 +259,13 @@ ## The following two tests are from the reference in the docstring above. -%!assert (isnan (sqrtm ([0 1; 0 0]))) +%!assert (any (isnan (sqrtm (x))(:) )) %!test %! x = eye (4); x(2,2) = x(3,3) = 2^-26; x(1,4) = 1; %! z = eye (4); z(2,2) = z(3,3) = 2^-13; z(1,4) = 0.5; %! [y, err] = sqrtm(x); %! assert (y, z) -%! assert (err, 0)## Yes, this one has to hold exactly +%! assert (err, 0) ## Yes, this one has to hold exactly */