comparison 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
comparison
equal deleted inserted replaced
7813:12a68443191c 7814:87865ed7405f
152 152
153 return retval; 153 return retval;
154 } 154 }
155 155
156 /* 156 /*
157
158 %!test
159 %! a = [1, 2, 3; 5, 4, 6; 8, 7, 9];
160 %! [p, h] = hess (a);
161 %! assert(p * h * p', a, sqrt(eps));
162
163 %!test
164 %! a = single([1, 2, 3; 5, 4, 6; 8, 7, 9]);
165 %! [p, h] = hess (a);
166 %! assert(p * h * p', a, sqrt(eps ('single')));
167
168 %!error <Invalid call to hess.*> hess ();
169 %!error <Invalid call to hess.*> hess ([1, 2; 3, 4], 2);
170 %!error hess ([1, 2; 3, 4; 5, 6]);
171
172 */
173
174 /*
157 ;;; Local Variables: *** 175 ;;; Local Variables: ***
158 ;;; mode: C++ *** 176 ;;; mode: C++ ***
159 ;;; End: *** 177 ;;; End: ***
160 */ 178 */