diff scripts/elfun/acot.m @ 7385:8b7b4f58199f

[project @ 2008-01-15 20:49:09 by jwe]
author jwe
date Tue, 15 Jan 2008 20:49:10 +0000
parents a1dbe9d80eee
children 95ecf219a582
line wrap: on
line diff
--- a/scripts/elfun/acot.m
+++ b/scripts/elfun/acot.m
@@ -33,3 +33,17 @@
   w = atan (1./z);
 
 endfunction
+
+%!test
+%! rt2 = sqrt (2);
+%! rt3 = sqrt (3);
+%! x = [rt3, 1, rt3/3, 0, -rt3/3, -1, -rt3];
+%! v = [pi/6, pi/4, pi/3, pi/2, -pi/3, -pi/4, -pi/6];
+%! assert(all (abs (acot (x) - v) < sqrt (eps))
+%! 
+%! );
+
+%!error acot ();
+
+%!error acot (1, 2);
+