diff scripts/elfun/acoth.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 eb63fbe60fab
line wrap: on
line diff
--- a/scripts/elfun/acoth.m
+++ b/scripts/elfun/acoth.m
@@ -33,3 +33,15 @@
   w = atanh (1 ./ z);
 
 endfunction
+
+%!test
+%! rt2 = sqrt (2);
+%! rt3 = sqrt (3);
+%! v = -i*[pi/6, pi/4, pi/3, -pi/3, -pi/4, -pi/6];
+%! x = i*[rt3, 1, rt3/3, -rt3/3, -1, -rt3];
+%! assert(all (abs (acoth (x) - v) < sqrt (eps)));
+
+%!error acoth ();
+
+%!error acoth (1, 2);
+