changeset 8067:c476c2214a90

Adjust tolerance to single precision test.
author Ben Abbott <bpabbott@mac.com>
date Tue, 26 Aug 2008 23:28:32 -0400
parents 366821c0c01c
children e3e3d12364b0
files src/ChangeLog src/mappers.cc
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Tue Aug 26 23:26:58 2008 -0400
+++ b/src/ChangeLog	Tue Aug 26 23:28:32 2008 -0400
@@ -1,6 +1,8 @@
 2008-08-26 Ben Abbott <bpabott@mac.com>
 
-	* DLD-FUNCTIONS/chol.cc (test): Double tolerance.
+	* mappers.cc: Adjust tolerance for single precesion tests.
+
+	* DLD-FUNCTIONS/chol.cc: Double tolerance.
 
 2008-08-26  Jaroslav Hajek <highegg@gmail.com>
 
--- a/src/mappers.cc	Tue Aug 26 23:26:58 2008 -0400
+++ b/src/mappers.cc	Tue Aug 26 23:28:32 2008 -0400
@@ -217,7 +217,7 @@
 %!assert(arg (single(i)), single(pi/2));
 %!assert(arg (single(-1)), single(pi));
 %!assert(arg (single(-i)), single(-pi/2));
-%!assert(arg (single([1, i; -1, -i])), single([0, pi/2; pi, -pi/2]));
+%!assert(arg (single([1, i; -1, -i])), single([0, pi/2; pi, -pi/2]), 2e1*eps('single'));
 
 %!error arg ();
 %!error arg (1, 2);
@@ -1185,7 +1185,7 @@
 %!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([-0.5, -1.5, -2.5])), single(log([0.5, 1.5, 2.5]) + pi*1i), sqrt (eps));
+%!assert(log (single([-0.5, -1.5, -2.5])), single(log([0.5, 1.5, 2.5]) + pi*1i), 4*eps('single'));
 
 %!error log ();
 %!error log (1, 2);