Mercurial > forge
changeset 5672:70ed4ab7ab5f octave-forge
Get around system-dependent precision problems when testing functions acker and place. Thanks to Rafael Laboissiere <rafael@debian.org> for the report and the patch.
author | slackydeb |
---|---|
date | Fri, 22 May 2009 13:58:34 +0000 |
parents | a4e8c00c8047 |
children | bac312ead21f |
files | main/control/inst/acker.m main/control/inst/place.m |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/main/control/inst/acker.m Fri May 22 12:53:31 2009 +0000 +++ b/main/control/inst/acker.m Fri May 22 13:58:34 2009 +0000 @@ -23,7 +23,7 @@ ## @end deftypefn ## Author: Luca Favatella <slackydeb@gmail.com> -## Version: 0.1 +## Version: 0.1.1 # TODO: modify this function to use # Ackermann's formula instead of being @@ -43,4 +43,4 @@ %! B = [0; 1]; %! P = [-1 -0.5]; %! Kexpected = [3.5 3.5]; -%! assert (acker (A, B, P), Kexpected); \ No newline at end of file +%! assert (acker (A, B, P), Kexpected, 2*eps); \ No newline at end of file
--- a/main/control/inst/place.m Fri May 22 12:53:31 2009 +0000 +++ b/main/control/inst/place.m Fri May 22 13:58:34 2009 +0000 @@ -135,5 +135,5 @@ %! C = [2 1]; # C is useful to use ss; it doesn't matter what the value of C is %! P = [-1 -0.5]; %! Kexpected = [3.5 3.5]; -%!assert (place (ss (A, B, C), P), Kexpected); -%!assert (place (A, B, P), Kexpected); \ No newline at end of file +%!assert (place (ss (A, B, C), P), Kexpected, 2*eps); +%!assert (place (A, B, P), Kexpected, 2*eps); \ No newline at end of file