# HG changeset patch # User jwe # Date 1200430150 0 # Node ID 8b7b4f58199f41c0a2c239586c00283e9f9affaf # Parent 47c9192547911f4862220943f5f06932763f1db1 [project @ 2008-01-15 20:49:09 by jwe] diff -r 47c919254791 -r 8b7b4f58199f scripts/ChangeLog --- a/scripts/ChangeLog Tue Jan 15 20:27:02 2008 +0000 +++ b/scripts/ChangeLog Tue Jan 15 20:49:10 2008 +0000 @@ -1,3 +1,12 @@ +2008-01-15 Thomas Weber + + * elfun/acot.m, elfun/acoth.m, elfun/acsc.m, elfun/acsch.m, + elfun/asec.m, elfun/asech.m, elfun/cot.m, elfun/coth.m, + elfun/csc.m,elfun/csch.m, elfun/lcm.m, elfun/sec.m, elfun/sech.m, + general/rem.m, miscellaneous/bincoeff.m, miscellaneous/xor.m, + specfun/beta.m, specfun/log2.m, specfun/pow2.m: + Move tests here from test/test_arith.m. + 2008-01-15 John W. Eaton * linear-algebra/__norm__.m: Use sum(abs(x),2), not sum(abs(x.')). diff -r 47c919254791 -r 8b7b4f58199f scripts/elfun/acot.m --- a/scripts/elfun/acot.m Tue Jan 15 20:27:02 2008 +0000 +++ b/scripts/elfun/acot.m Tue Jan 15 20:49:10 2008 +0000 @@ -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); + diff -r 47c919254791 -r 8b7b4f58199f scripts/elfun/acoth.m --- a/scripts/elfun/acoth.m Tue Jan 15 20:27:02 2008 +0000 +++ b/scripts/elfun/acoth.m Tue Jan 15 20:49:10 2008 +0000 @@ -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); + diff -r 47c919254791 -r 8b7b4f58199f scripts/elfun/acsc.m --- a/scripts/elfun/acsc.m Tue Jan 15 20:27:02 2008 +0000 +++ b/scripts/elfun/acsc.m Tue Jan 15 20:49:10 2008 +0000 @@ -33,3 +33,16 @@ w = asin (1 ./ z); endfunction + +%!test +%! rt2 = sqrt (2); +%! rt3 = sqrt (3); +%! v = [pi/6, pi/4, pi/3, pi/2, pi/3, pi/4, pi/6]; +%! x = [2, rt2, 2*rt3/3, 1, 2*rt3/3, rt2, 2]; +%! assert(all (abs (acsc (x) - v) < sqrt (eps)) +%! ); + +%!error acsc (); + +%!error acsc (1, 2); + diff -r 47c919254791 -r 8b7b4f58199f scripts/elfun/acsch.m --- a/scripts/elfun/acsch.m Tue Jan 15 20:27:02 2008 +0000 +++ b/scripts/elfun/acsch.m Tue Jan 15 20:49:10 2008 +0000 @@ -33,3 +33,14 @@ w = asinh (1 ./ z); endfunction + +%!test +%! v = [pi/2*i, -pi/2*i]; +%! x = [-i, i]; +%! assert(all (abs (acsch (x) - v) < sqrt (eps)) +%! ); + +%!error acsch (); + +%!error acsch (1, 2); + diff -r 47c919254791 -r 8b7b4f58199f scripts/elfun/asec.m --- a/scripts/elfun/asec.m Tue Jan 15 20:27:02 2008 +0000 +++ b/scripts/elfun/asec.m Tue Jan 15 20:49:10 2008 +0000 @@ -33,3 +33,17 @@ w = acos (1 ./ z); endfunction + +%!test +%! rt2 = sqrt (2); +%! rt3 = sqrt (3); +%! v = [0, pi/6, pi/4, pi/3, 2*pi/3, 3*pi/4, 5*pi/6, pi]; +%! x = [1, 2*rt3/3, rt2, 2, -2, -rt2, -2*rt3/3, -1]; +%! assert(all (abs (asec (x) - v) < sqrt (eps)) +%! +%! ); + +%!error asec (); + +%!error asec (1, 2); + diff -r 47c919254791 -r 8b7b4f58199f scripts/elfun/asech.m --- a/scripts/elfun/asech.m Tue Jan 15 20:27:02 2008 +0000 +++ b/scripts/elfun/asech.m Tue Jan 15 20:49:10 2008 +0000 @@ -33,3 +33,14 @@ w = acosh (1 ./ z); endfunction + +%!test +%! v = [0, pi*i]; +%! x = [1, -1]; +%! assert(all (abs (asech (x) - v) < sqrt (eps)) +%! ); + +%!error asech (); + +%!error asech (1, 2); + diff -r 47c919254791 -r 8b7b4f58199f scripts/elfun/cot.m --- a/scripts/elfun/cot.m Tue Jan 15 20:27:02 2008 +0000 +++ b/scripts/elfun/cot.m Tue Jan 15 20:49:10 2008 +0000 @@ -33,3 +33,15 @@ w = 1 ./ tan(z); endfunction + +%!test +%! rt2 = sqrt (2); +%! rt3 = sqrt (3); +%! x = [pi/6, pi/4, pi/3, pi/2, 2*pi/3, 3*pi/4, 5*pi/6]; +%! v = [rt3, 1, rt3/3, 0, -rt3/3, -1, -rt3]; +%! assert(all (abs (cot (x) - v) < sqrt (eps))); + +%!error cot (); + +%!error cot (1, 2); + diff -r 47c919254791 -r 8b7b4f58199f scripts/elfun/coth.m --- a/scripts/elfun/coth.m Tue Jan 15 20:27:02 2008 +0000 +++ b/scripts/elfun/coth.m Tue Jan 15 20:49:10 2008 +0000 @@ -33,3 +33,13 @@ w = 1 ./ tanh (z); endfunction + +%!test +%! x = [pi/2*i, 3*pi/2*i]; +%! v = [0, 0]; +%! assert(all (abs (coth (x) - v) < sqrt (eps))); + +%!error coth (); + +%!error coth (1, 2); + diff -r 47c919254791 -r 8b7b4f58199f scripts/elfun/csc.m --- a/scripts/elfun/csc.m Tue Jan 15 20:27:02 2008 +0000 +++ b/scripts/elfun/csc.m Tue Jan 15 20:49:10 2008 +0000 @@ -33,3 +33,15 @@ w = 1 ./ sin(z); endfunction + +%!test +%! rt2 = sqrt (2); +%! rt3 = sqrt (3); +%! x = [pi/6, pi/4, pi/3, pi/2, 2*pi/3, 3*pi/4, 5*pi/6]; +%! v = [2, rt2, 2*rt3/3, 1, 2*rt3/3, rt2, 2]; +%! assert(all (abs (csc (x) - v) < sqrt (eps))); + +%!error csc (); + +%!error csc (1, 2); + diff -r 47c919254791 -r 8b7b4f58199f scripts/elfun/csch.m --- a/scripts/elfun/csch.m Tue Jan 15 20:27:02 2008 +0000 +++ b/scripts/elfun/csch.m Tue Jan 15 20:49:10 2008 +0000 @@ -33,3 +33,13 @@ w = 1 ./ sinh(z); endfunction + +%!test +%! x = [pi/2*i, 3*pi/2*i]; +%! v = [-i, i]; +%! assert(all (abs (csch (x) - v) < sqrt (eps))); + +%!error csch (); + +%!error csch (1, 2); + diff -r 47c919254791 -r 8b7b4f58199f scripts/elfun/lcm.m --- a/scripts/elfun/lcm.m Tue Jan 15 20:27:02 2008 +0000 +++ b/scripts/elfun/lcm.m Tue Jan 15 20:49:10 2008 +0000 @@ -93,3 +93,12 @@ endif endfunction + +%!assert(lcm (3, 5, 7, 15) == lcm ([3, 5, 7, 15]) && lcm ([3, 5, 7,15]) == 105); + +%!error lcm (); + +%!test +%! s.a = 1; +%! fail("lcm (s)"); + diff -r 47c919254791 -r 8b7b4f58199f scripts/elfun/sec.m --- a/scripts/elfun/sec.m Tue Jan 15 20:27:02 2008 +0000 +++ b/scripts/elfun/sec.m Tue Jan 15 20:49:10 2008 +0000 @@ -33,3 +33,15 @@ w = 1 ./ cos(z); endfunction + +%!test +%! rt2 = sqrt (2); +%! rt3 = sqrt (3); +%! x = [0, pi/6, pi/4, pi/3, 2*pi/3, 3*pi/4, 5*pi/6, pi]; +%! v = [1, 2*rt3/3, rt2, 2, -2, -rt2, -2*rt3/3, -1]; +%! assert(all (abs (sec (x) - v) < sqrt (eps))); + +%!error sec (); + +%!error sec (1, 2); + diff -r 47c919254791 -r 8b7b4f58199f scripts/elfun/sech.m --- a/scripts/elfun/sech.m Tue Jan 15 20:27:02 2008 +0000 +++ b/scripts/elfun/sech.m Tue Jan 15 20:49:10 2008 +0000 @@ -33,3 +33,13 @@ w = 1 ./ cosh(z); endfunction + +%!test +%! x = [0, pi*i]; +%! v = [1, -1]; +%! assert(all (abs (sech (x) - v) < sqrt (eps))); + +%!error sech (); + +%!error sech (1, 2); + diff -r 47c919254791 -r 8b7b4f58199f scripts/general/rem.m --- a/scripts/general/rem.m Tue Jan 15 20:27:02 2008 +0000 +++ b/scripts/general/rem.m Tue Jan 15 20:49:10 2008 +0000 @@ -53,3 +53,17 @@ endif endfunction + +%!assert(all (all (rem ([1, 2, 3; -1, -2, -3], 2) == [1, 0, 1; -1, 0, -1]))); + +%!assert(all (all (rem ([1, 2, 3; -1, -2, -3], 2 * ones (2, 3)) +%! == [1, 0, 1; -1, 0, -1]))); + +%!error rem (); + +%!error rem (1, 2, 3); + +%!error rem ([1, 2], [3, 4, 5]); + +%!error rem (i, 1); + diff -r 47c919254791 -r 8b7b4f58199f scripts/miscellaneous/bincoeff.m --- a/scripts/miscellaneous/bincoeff.m Tue Jan 15 20:27:02 2008 +0000 +++ b/scripts/miscellaneous/bincoeff.m Tue Jan 15 20:49:10 2008 +0000 @@ -102,3 +102,10 @@ %!assert(bincoeff(4,2), 6) %!assert(bincoeff(2,4), 0) %!assert(bincoeff(0.4,2), -.12, 8*eps) + +%!assert(bincoeff (5, 2) == 10 && bincoeff (50, 6) == 15890700); + +%!error bincoeff (); + +%!error bincoeff (1, 2, 3); + diff -r 47c919254791 -r 8b7b4f58199f scripts/miscellaneous/xor.m --- a/scripts/miscellaneous/xor.m Tue Jan 15 20:27:02 2008 +0000 +++ b/scripts/miscellaneous/xor.m Tue Jan 15 20:49:10 2008 +0000 @@ -42,3 +42,13 @@ endif endfunction + +%!assert((xor ([1, 1, 0, 0], [0, 1, 0, 1]) == [1, 0, 0, 1] +%! && xor ([i, i, 0, 0], [1, 0, 1, 0]) == [0, 1, 1, 0])); + +%!assert(all (all (xor (eye (2), fliplr (eye (2))) == ones (2)))); + +%!error xor (); + +%!error xor (1, 2, 3); + diff -r 47c919254791 -r 8b7b4f58199f scripts/specfun/beta.m --- a/scripts/specfun/beta.m Tue Jan 15 20:27:02 2008 +0000 +++ b/scripts/specfun/beta.m Tue Jan 15 20:49:10 2008 +0000 @@ -48,3 +48,16 @@ retval = exp (gammaln (a) + gammaln (b) - gammaln (a+b)); endfunction + +%!test +%! a=[1, 1.5, 2, 3]; +%! b=[4, 3, 2, 1]; +%! v1=beta(a,b); +%! v2=beta(b,a); +%! v3=gamma(a).*gamma(b)./gamma(a+b); +%! assert(all(abs(v1-v2) + * mappers.cc (install_mapper_functions): Move test for asin here + from test/test_arith.m. + * graphics.h.in (class line::properties, class text::properties): Rename erase_mode property to erasemode. diff -r 47c919254791 -r 8b7b4f58199f src/mappers.cc --- a/src/mappers.cc Tue Jan 15 20:27:02 2008 +0000 +++ b/src/mappers.cc Tue Jan 15 20:49:10 2008 +0000 @@ -248,6 +248,17 @@ Compute the inverse sine of each element of @var{x}.\n\ @end deftypefn"); +/* +%!test +%! rt2 = sqrt (2); +%! rt3 = sqrt (3); +%! v = [0, pi/6, pi/4, pi/3, pi/2, pi/3, pi/4, pi/6, 0]; +%! x = [0, 1/2, rt2/2, rt3/2, 1, rt3/2, rt2/2, 1/2, 0]; +%! assert(all (abs (asin (x) - v) < sqrt (eps))); +%!error asin (); +%!error asin (1, 2); +*/ + DEFUN_MAPPER (asinh, 0, 0, 0, asinh, 0, asinh, 0.0, 0.0, 0, 0, "-*- texinfo -*-\n\ @deftypefn {Mapping Function} {} asinh (@var{x})\n\ diff -r 47c919254791 -r 8b7b4f58199f test/ChangeLog --- a/test/ChangeLog Tue Jan 15 20:27:02 2008 +0000 +++ b/test/ChangeLog Tue Jan 15 20:49:10 2008 +0000 @@ -1,3 +1,7 @@ +2008-01-15 Thomas Weber + + * test_arith.m: Move tests to source files. + 2008-01-15 John W. Eaton * test_audio.m, test_control.m, test_image.m, test_optim.m, diff -r 47c919254791 -r 8b7b4f58199f test/test_arith.m --- a/test/test_arith.m Tue Jan 15 20:27:02 2008 +0000 +++ b/test/test_arith.m Tue Jan 15 20:49:10 2008 +0000 @@ -18,20 +18,6 @@ %% Automatically generated from DejaGNU files -%% test/octave.test/arith/beta-1.m -%!test -%! a=[1, 1.5, 2, 3]; -%! b=[4, 3, 2, 1]; -%! v1=beta(a,b); -%! v2=beta(b,a); -%! v3=gamma(a).*gamma(b)./gamma(a+b); -%! assert(all(abs(v1-v2) min (1, 2, 3, 4); -%% test/octave.test/arith/pow2-1.m -%!test -%! x = [3, 0, -3]; -%! v = [8, 1, .125]; -%! assert(all (abs (pow2 (x) - v) < sqrt (eps))); - -%% test/octave.test/arith/pow2-2.m -%!test -%! x = [3, 0, -3, 4, 0, -4, 5, 0, -5]; -%! y = [-2, -2, -2, 1, 1, 1, 3, 3, 3]; -%! z = x .* (2 .^ y); -%! assert(all (abs (pow2 (x,y) - z) < sqrt (eps)) -%! ); - -%% test/octave.test/arith/pow2-3.m -%!error pow2(); - -%% test/octave.test/arith/rem-1.m -%!assert(all (all (rem ([1, 2, 3; -1, -2, -3], 2) == [1, 0, 1; -1, 0, -1]))); - -%% test/octave.test/arith/rem-2.m -%!assert(all (all (rem ([1, 2, 3; -1, -2, -3], 2 * ones (2, 3)) -%! == [1, 0, 1; -1, 0, -1]))); - -%% test/octave.test/arith/rem-3.m -%!error rem (); - -%% test/octave.test/arith/rem-4.m -%!error rem (1, 2, 3); - -%% test/octave.test/arith/rem-5.m -%!error rem ([1, 2], [3, 4, 5]); - -%% test/octave.test/arith/rem-6.m -%!error rem (i, 1); - %% test/octave.test/arith/round-1.m %!assert((round (1) == 1 && round (1.1) == 1 && round (5.5) == 6 %! && round (i) == i && round (2.5+3.5i) == 3+4i && round (-2.6) == -3)); @@ -275,19 +214,6 @@ %% test/octave.test/arith/abs-4.m %!error abs (1, 2); -%% test/octave.test/arith/xor-1.m -%!assert((xor ([1, 1, 0, 0], [0, 1, 0, 1]) == [1, 0, 0, 1] -%! && xor ([i, i, 0, 0], [1, 0, 1, 0]) == [0, 1, 1, 0])); - -%% test/octave.test/arith/xor-2.m -%!assert(all (all (xor (eye (2), fliplr (eye (2))) == ones (2)))); - -%% test/octave.test/arith/xor-3.m -%!error xor (); - -%% test/octave.test/arith/xor-4.m -%!error xor (1, 2, 3); - %% test/octave.test/arith/arg-1.m %!assert(arg (1) == 0 && arg (i) == pi/2 && arg (-1) == pi && arg (-i) == -pi/2); @@ -354,15 +280,6 @@ %% test/octave.test/arith/log10-3.m %!error log10 (1, 2); -%% test/octave.test/arith/log2-1.m -%!assert(all (abs (log2 ([1/4, 1/2, 1, 2, 4]) - [-2, -1, 0, 1, 2]) < sqrt (eps))); - -%% test/octave.test/arith/log2-2.m -%!error log2 (); - -%% test/octave.test/arith/log2-3.m -%!error log2 (1, 2); - %% test/octave.test/arith/sin-1.m %!test %! rt2 = sqrt (2); @@ -405,64 +322,6 @@ %% test/octave.test/arith/tan-3.m %!error tan (1, 2); -%% test/octave.test/arith/sec-1.m -%!test -%! rt2 = sqrt (2); -%! rt3 = sqrt (3); -%! x = [0, pi/6, pi/4, pi/3, 2*pi/3, 3*pi/4, 5*pi/6, pi]; -%! v = [1, 2*rt3/3, rt2, 2, -2, -rt2, -2*rt3/3, -1]; -%! assert(all (abs (sec (x) - v) < sqrt (eps))); - -%% test/octave.test/arith/sec-2.m -%!error sec (); - -%% test/octave.test/arith/sec-3.m -%!error sec (1, 2); - -%% test/octave.test/arith/csc-1.m -%!test -%! rt2 = sqrt (2); -%! rt3 = sqrt (3); -%! x = [pi/6, pi/4, pi/3, pi/2, 2*pi/3, 3*pi/4, 5*pi/6]; -%! v = [2, rt2, 2*rt3/3, 1, 2*rt3/3, rt2, 2]; -%! assert(all (abs (csc (x) - v) < sqrt (eps))); - -%% test/octave.test/arith/csc-2.m -%!error csc (); - -%% test/octave.test/arith/csc-3.m -%!error csc (1, 2); - -%% test/octave.test/arith/cot-1.m -%!test -%! rt2 = sqrt (2); -%! rt3 = sqrt (3); -%! x = [pi/6, pi/4, pi/3, pi/2, 2*pi/3, 3*pi/4, 5*pi/6]; -%! v = [rt3, 1, rt3/3, 0, -rt3/3, -1, -rt3]; -%! assert(all (abs (cot (x) - v) < sqrt (eps))); - -%% test/octave.test/arith/cot-2.m -%!error cot (); - -%% test/octave.test/arith/cot-3.m -%!error cot (1, 2); - -%% test/octave.test/arith/asin-1.m -%!test -%! rt2 = sqrt (2); -%! rt3 = sqrt (3); -%! v = [0, pi/6, pi/4, pi/3, pi/2, pi/3, pi/4, pi/6, 0]; -%! x = [0, 1/2, rt2/2, rt3/2, 1, rt3/2, rt2/2, 1/2, 0]; -%! assert(all (abs (asin (x) - v) < sqrt (eps)) -%! -%! ); - -%% test/octave.test/arith/asin-2.m -%!error asin (); - -%% test/octave.test/arith/asin-3.m -%!error asin (1, 2); - %% test/octave.test/arith/acos-1.m %!test %! rt2 = sqrt (2); @@ -495,53 +354,6 @@ %% test/octave.test/arith/atan-3.m %!error atan (1, 2); -%% test/octave.test/arith/asec-1.m -%!test -%! rt2 = sqrt (2); -%! rt3 = sqrt (3); -%! v = [0, pi/6, pi/4, pi/3, 2*pi/3, 3*pi/4, 5*pi/6, pi]; -%! x = [1, 2*rt3/3, rt2, 2, -2, -rt2, -2*rt3/3, -1]; -%! assert(all (abs (asec (x) - v) < sqrt (eps)) -%! -%! ); - -%% test/octave.test/arith/asec-2.m -%!error asec (); - -%% test/octave.test/arith/asec-3.m -%!error asec (1, 2); - -%% test/octave.test/arith/acsc-1.m -%!test -%! rt2 = sqrt (2); -%! rt3 = sqrt (3); -%! v = [pi/6, pi/4, pi/3, pi/2, pi/3, pi/4, pi/6]; -%! x = [2, rt2, 2*rt3/3, 1, 2*rt3/3, rt2, 2]; -%! assert(all (abs (acsc (x) - v) < sqrt (eps)) -%! ); - -%% test/octave.test/arith/acsc-2.m -%!error acsc (); - -%% test/octave.test/arith/acsc-3.m -%!error acsc (1, 2); - -%% test/octave.test/arith/acot-1.m -%!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)) -%! -%! ); - -%% test/octave.test/arith/acot-2.m -%!error acot (); - -%% test/octave.test/arith/acot-3.m -%!error acot (1, 2); - %% test/octave.test/arith/sinh-1.m %!test %! x = [0, pi/2*i, pi*i, 3*pi/2*i]; @@ -578,42 +390,6 @@ %% test/octave.test/arith/tanh-3.m %!error tanh (1, 2); -%% test/octave.test/arith/sech-1.m -%!test -%! x = [0, pi*i]; -%! v = [1, -1]; -%! assert(all (abs (sech (x) - v) < sqrt (eps))); - -%% test/octave.test/arith/sech-2.m -%!error sech (); - -%% test/octave.test/arith/sech-3.m -%!error sech (1, 2); - -%% test/octave.test/arith/csch-1.m -%!test -%! x = [pi/2*i, 3*pi/2*i]; -%! v = [-i, i]; -%! assert(all (abs (csch (x) - v) < sqrt (eps))); - -%% test/octave.test/arith/csch-2.m -%!error csch (); - -%% test/octave.test/arith/csch-3.m -%!error csch (1, 2); - -%% test/octave.test/arith/coth-1.m -%!test -%! x = [pi/2*i, 3*pi/2*i]; -%! v = [0, 0]; -%! assert(all (abs (coth (x) - v) < sqrt (eps))); - -%% test/octave.test/arith/coth-2.m -%!error coth (); - -%% test/octave.test/arith/coth-3.m -%!error coth (1, 2); - %% test/octave.test/arith/asinh-1.m %!test %! v = [0, pi/2*i, 0, -pi/2*i]; @@ -653,46 +429,6 @@ %% test/octave.test/arith/atanh-3.m %!error atanh (1, 2); -%% test/octave.test/arith/asech-1.m -%!test -%! v = [0, pi*i]; -%! x = [1, -1]; -%! assert(all (abs (asech (x) - v) < sqrt (eps)) -%! ); - -%% test/octave.test/arith/asech-2.m -%!error asech (); - -%% test/octave.test/arith/asech-3.m -%!error asech (1, 2); - -%% test/octave.test/arith/acsch-1.m -%!test -%! v = [pi/2*i, -pi/2*i]; -%! x = [-i, i]; -%! assert(all (abs (acsch (x) - v) < sqrt (eps)) -%! ); - -%% test/octave.test/arith/acsch-2.m -%!error acsch (); - -%% test/octave.test/arith/acsch-3.m -%!error acsch (1, 2); - -%% test/octave.test/arith/acoth-1.m -%!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))); - -%% test/octave.test/arith/acoth-2.m -%!error acoth (); - -%% test/octave.test/arith/acoth-3.m -%!error acoth (1, 2); - %% test/octave.test/arith/atan2-1.m %!test %! rt2 = sqrt (2); @@ -812,12 +548,4 @@ %!assert (all (sumsq ([1, 2; 3, 4], 1) == [10, 20])); %!assert (all (sumsq ([1, 2; 3, 4], 2) == [5; 25])); -%% test/octave.test/arith/bincoeff-1.m -%!assert(bincoeff (5, 2) == 10 && bincoeff (50, 6) == 15890700); -%% test/octave.test/arith/bincoeff-2.m -%!error bincoeff (); - -%% test/octave.test/arith/bincoeff-3.m -%!error bincoeff (1, 2, 3); -