diff src/DLD-FUNCTIONS/hess.cc @ 7814:87865ed7405f

Second set of single precision test code and fix of resulting bugs
author David Bateman <dbateman@free.fr>
date Mon, 02 Jun 2008 16:57:45 +0200
parents 82be108cc558
children 81d6ab3ac93c
line wrap: on
line diff
--- a/src/DLD-FUNCTIONS/hess.cc	Thu May 22 22:00:26 2008 +0200
+++ b/src/DLD-FUNCTIONS/hess.cc	Mon Jun 02 16:57:45 2008 +0200
@@ -154,6 +154,24 @@
 }
 
 /*
+
+%!test
+%! a = [1, 2, 3; 5, 4, 6; 8, 7, 9];
+%! [p, h] = hess (a);
+%! assert(p * h * p', a, sqrt(eps));
+
+%!test
+%! a = single([1, 2, 3; 5, 4, 6; 8, 7, 9]);
+%! [p, h] = hess (a);
+%! assert(p * h * p', a, sqrt(eps ('single')));
+
+%!error <Invalid call to hess.*> hess ();
+%!error <Invalid call to hess.*> hess ([1, 2; 3, 4], 2);
+%!error hess ([1, 2; 3, 4; 5, 6]);
+
+*/
+
+/*
 ;;; Local Variables: ***
 ;;; mode: C++ ***
 ;;; End: ***