Mercurial > hg > octave-lojdl
changeset 8084:46aa04055325
Use eps(single) as tolerance for single precesion test.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Wed, 03 Sep 2008 11:40:55 -0400 |
parents | 16ab78b816bc |
children | 0a48abc35932 |
files | src/ChangeLog src/mappers.cc |
diffstat | 2 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2008-09-03 Ben Abbott <bpabott@mac.com> + + * mappers.cc: Use eps(single) as tolerance for single precesion test. + 2008-09-03 John W. Eaton <jwe@octave.org> * variables.cc (mlock): Lock current function on the call stack.
--- a/src/mappers.cc +++ b/src/mappers.cc @@ -1184,7 +1184,7 @@ %!assert(log ([1, e, e^2]), [0, 1, 2], sqrt (eps)); %!assert(log ([-0.5, -1.5, -2.5]), log([0.5, 1.5, 2.5]) + pi*1i, sqrt (eps)); -%!assert(log (single([1, e, e^2])), single([0, 1, 2]), 4*sqrt (eps)); +%!assert(log (single([1, e, e^2])), single([0, 1, 2]), sqrt (eps('single'))); %!assert(log (single([-0.5, -1.5, -2.5])), single(log([0.5, 1.5, 2.5]) + pi*1i), 4*eps('single')); %!error log ();