h2ph misquotes #error directives
[p5sagit/p5-mst-13.2.git] / t / lib / complex.t
1 #!./perl
2
3 # $RCSfile: complex.t,v $
4 #
5 # Regression tests for the Math::Complex pacakge
6 # -- Raphael Manfredi   since Sep 1996
7 # -- Jarkko Hietaniemi  since Mar 1997
8 # -- Daniel S. Lewart   since Sep 1997
9
10 BEGIN {
11     chdir 't' if -d 't';
12     @INC = '../lib';
13 }
14
15 use Math::Complex;
16
17 $VERSION = sprintf("%s", q$Id: complex.t,v 1.8 1998/02/05 16:03:39 jhi Exp $ =~ /(\d+\.d+)/);
18
19 my ($args, $op, $target, $test, $test_set, $try, $val, $zvalue, @set, @val);
20
21 $test = 0;
22 $| = 1;
23 my @script = (
24     'my ($res, $s0,$s1,$s2,$s3,$s4,$s5,$s6,$s7,$s8,$s9,$s10, $z0,$z1,$z2);' .
25         "\n\n"
26 );
27 my $eps = 1e-13;
28
29 if ($^O eq 'unicos') {  # For some reason root() produces very inaccurate
30     $eps = 1e-11;       # results in Cray UNICOS, and occasionally also
31 }                       # cos(), sin(), cosh(), sinh().  The division
32                         # of doubles is the current suspect.
33
34 while (<DATA>) {
35         s/^\s+//;
36         next if $_ eq '' || /^\#/;
37         chomp;
38         $test_set = 0;          # Assume not a test over a set of values
39         if (/^&(.+)/) {
40                 $op = $1;
41                 next;
42         }
43         elsif (/^\{(.+)\}/) {
44                 set($1, \@set, \@val);
45                 next;
46         }
47         elsif (s/^\|//) {
48                 $test_set = 1;  # Requests we loop over the set...
49         }
50         my @args = split(/:/);
51         if ($test_set == 1) {
52                 my $i;
53                 for ($i = 0; $i < @set; $i++) {
54                         # complex number
55                         $target = $set[$i];
56                         # textual value as found in set definition
57                         $zvalue = $val[$i];
58                         test($zvalue, $target, @args);
59                 }
60         } else {
61                 test($op, undef, @args);
62         }
63 }
64
65 #
66
67 sub test_mutators {
68     my $op;
69
70     $test++;
71 push(@script, <<'EOT');
72 {
73     my $z = cplx(  1,  1);
74     $z->Re(2);
75     $z->Im(3);
76     print 'not ' unless Re($z) == 2 and Im($z) == 3;
77 EOT
78     push(@script, qq(print "ok $test\\n"}\n));
79
80     $test++;
81 push(@script, <<'EOT');
82 {
83     my $z = cplx(  1,  1);
84     $z->abs(3 * sqrt(2));
85     print 'not ' unless (abs($z) - 3 * sqrt(2)) < $eps and
86                         (arg($z) - pi / 4     ) < $eps and
87                         (Re($z) - 3           ) < $eps and
88                         (Im($z) - 3           ) < $eps;
89 EOT
90     push(@script, qq(print "ok $test\\n"}\n));
91
92     $test++;
93 push(@script, <<'EOT');
94 {
95     my $z = cplx(  1,  1);
96     $z->arg(-3 / 4 * pi);
97     print 'not ' unless (arg($z) + 3 / 4 * pi) < $eps and
98                         (abs($z) - sqrt(2)   ) < $eps and
99                         (Re($z) + 1          ) < $eps and
100                         (Im($z) + 1          ) < $eps;
101 EOT
102     push(@script, qq(print "ok $test\\n"}\n));
103 }
104
105 test_mutators();
106
107 my $constants = '
108 my $i    = cplx(0,  1);
109 my $pi   = cplx(pi, 0);
110 my $pii  = cplx(0, pi);
111 my $pip2 = cplx(pi/2, 0);
112 my $zero = cplx(0, 0);
113 ';
114
115 push(@script, $constants);
116
117
118 # test the divbyzeros
119
120 sub test_dbz {
121     for my $op (@_) {
122         $test++;
123
124         push(@script, <<EOT);
125 eval '$op';
126 print 'not ' unless (\$@ =~ /Division by zero/);
127 EOT
128         push(@script, qq(print "ok $test\\n";\n));
129     }
130 }
131
132 # test the logofzeros
133
134 sub test_loz {
135     for my $op (@_) {
136         $test++;
137
138         push(@script, <<EOT);
139 eval '$op';
140 print 'not ' unless (\$@ =~ /Logarithm of zero/);
141 EOT
142         push(@script, qq(print "ok $test\\n";\n));
143     }
144 }
145
146 test_dbz(
147          'i/0',
148          'acot(0)',
149          'acot(+$i)',
150 #        'acoth(-1)',   # Log of zero.
151          'acoth(0)',
152          'acoth(+1)',
153          'acsc(0)',
154          'acsch(0)',
155          'asec(0)',
156          'asech(0)',
157          'atan(-$i)',
158          'atan($i)',
159 #        'atanh(-1)',   # Log of zero.
160          'atanh(+1)',
161          'cot(0)',
162          'coth(0)',
163          'csc(0)',
164          'tan($pip2)',
165          'csch(0)',
166          'tan($pip2)',
167         );
168
169 test_loz(
170          'log($zero)',
171          'acot(-$i)',
172          'atanh(-1)',
173          'acoth(-1)',
174         );
175
176 # test the 0**0
177
178 sub test_ztz {
179     $test++;
180
181     push(@script, <<'EOT');
182 eval 'cplx(0)**cplx(0)';
183 print 'not ' unless ($@ =~ /zero raised to the zeroth/);
184 EOT
185     push(@script, qq(print "ok $test\\n";\n));
186 }
187
188 test_ztz;
189
190 # test the bad roots
191
192 sub test_broot {
193     for my $op (@_) {
194         $test++;
195
196         push(@script, <<EOT);
197 eval 'root(2, $op)';
198 print 'not ' unless (\$@ =~ /root must be/);
199 EOT
200         push(@script, qq(print "ok $test\\n";\n));
201     }
202 }
203
204 test_broot(qw(-3 -2.1 0 0.99));
205
206 print "1..$test\n";
207 eval join '', @script;
208 die $@ if $@;
209
210 sub abop {
211         my ($op) = @_;
212
213         push(@script, qq(print "# $op=\n";));
214 }
215
216 sub test {
217         my ($op, $z, @args) = @_;
218         my ($baop) = 0;
219         $test++;
220         my $i;
221         $baop = 1 if ($op =~ s/;=$//);
222         for ($i = 0; $i < @args; $i++) {
223                 $val = value($args[$i]);
224                 push @script, "\$z$i = $val;\n";
225         }
226         if (defined $z) {
227                 $args = "'$op'";                # Really the value
228                 $try = "abs(\$z0 - \$z1) <= $eps ? \$z1 : \$z0";
229                 push @script, "\$res = $try; ";
230                 push @script, "check($test, $args[0], \$res, \$z$#args, $args);\n";
231         } else {
232                 my ($try, $args);
233                 if (@args == 2) {
234                         $try = "$op \$z0";
235                         $args = "'$args[0]'";
236                 } else {
237                         $try = ($op =~ /^\w/) ? "$op(\$z0, \$z1)" : "\$z0 $op \$z1";
238                         $args = "'$args[0]', '$args[1]'";
239                 }
240                 push @script, "\$res = $try; ";
241                 push @script, "check($test, '$try', \$res, \$z$#args, $args);\n";
242                 if (@args > 2 and $baop) { # binary assignment ops
243                         $test++;
244                         # check the op= works
245                         push @script, <<EOB;
246 {
247         my \$za = cplx(ref \$z0 ? \@{\$z0->cartesian} : (\$z0, 0));
248
249         my (\$z1r, \$z1i) = ref \$z1 ? \@{\$z1->cartesian} : (\$z1, 0);
250
251         my \$zb = cplx(\$z1r, \$z1i);
252
253         \$za $op= \$zb;
254         my (\$zbr, \$zbi) = \@{\$zb->cartesian};
255
256         check($test, '\$z0 $op= \$z1', \$za, \$z$#args, $args);
257 EOB
258                         $test++;
259                         # check that the rhs has not changed
260                         push @script, qq(print "not " unless (\$zbr == \$z1r and \$zbi == \$z1i););
261                         push @script, qq(print "ok $test\\n";\n);
262                         push @script, "}\n";
263                 }
264         }
265 }
266
267 sub set {
268         my ($set, $setref, $valref) = @_;
269         @{$setref} = ();
270         @{$valref} = ();
271         my @set = split(/;\s*/, $set);
272         my @res;
273         my $i;
274         for ($i = 0; $i < @set; $i++) {
275                 push(@{$valref}, $set[$i]);
276                 my $val = value($set[$i]);
277                 push @script, "\$s$i = $val;\n";
278                 push @{$setref}, "\$s$i";
279         }
280 }
281
282 sub value {
283         local ($_) = @_;
284         if (/^\s*\((.*),(.*)\)/) {
285                 return "cplx($1,$2)";
286         }
287         elsif (/^\s*([\-\+]?(?:\d+(\.\d+)?|\.\d+)(?:[e[\-\+]\d+])?)/) {
288                 return "cplx($1,0)";
289         }
290         elsif (/^\s*\[(.*),(.*)\]/) {
291                 return "cplxe($1,$2)";
292         }
293         elsif (/^\s*'(.*)'/) {
294                 my $ex = $1;
295                 $ex =~ s/\bz\b/$target/g;
296                 $ex =~ s/\br\b/abs($target)/g;
297                 $ex =~ s/\bt\b/arg($target)/g;
298                 $ex =~ s/\ba\b/Re($target)/g;
299                 $ex =~ s/\bb\b/Im($target)/g;
300                 return $ex;
301         }
302         elsif (/^\s*"(.*)"/) {
303                 return "\"$1\"";
304         }
305         return $_;
306 }
307
308 sub check {
309         my ($test, $try, $got, $expected, @z) = @_;
310
311 #       print "# @_\n";
312
313         if ("$got" eq "$expected"
314             ||
315             ($expected =~ /^-?\d/ && $got == $expected)
316             ||
317             (abs($got - $expected) < $eps)
318             ) {
319                 print "ok $test\n";
320         } else {
321                 print "not ok $test\n";
322                 my $args = (@z == 1) ? "z = $z[0]" : "z0 = $z[0], z1 = $z[1]";
323                 print "# '$try' expected: '$expected' got: '$got' for $args\n";
324         }
325 }
326
327 sub addsq {
328     my ($z1, $z2) = @_;
329     return ($z1 + i*$z2) * ($z1 - i*$z2);
330 }
331
332 sub subsq {
333     my ($z1, $z2) = @_;
334     return ($z1 + $z2) * ($z1 - $z2);
335 }
336
337 __END__
338 &+;=
339 (3,4):(3,4):(6,8)
340 (-3,4):(3,-4):(0,0)
341 (3,4):-3:(0,4)
342 1:(4,2):(5,2)
343 [2,0]:[2,pi]:(0,0)
344
345 &++
346 (2,1):(3,1)
347
348 &-;=
349 (2,3):(-2,-3)
350 [2,pi/2]:[2,-(pi)/2]
351 2:[2,0]:(0,0)
352 [3,0]:2:(1,0)
353 3:(4,5):(-1,-5)
354 (4,5):3:(1,5)
355 (2,1):(3,5):(-1,-4)
356
357 &--
358 (1,2):(0,2)
359 [2,pi]:[3,pi]
360
361 &*;=
362 (0,1):(0,1):(-1,0)
363 (4,5):(1,0):(4,5)
364 [2,2*pi/3]:(1,0):[2,2*pi/3]
365 2:(0,1):(0,2)
366 (0,1):3:(0,3)
367 (0,1):(4,1):(-1,4)
368 (2,1):(4,-1):(9,2)
369
370 &/;=
371 (3,4):(3,4):(1,0)
372 (4,-5):1:(4,-5)
373 1:(0,1):(0,-1)
374 (0,6):(0,2):(3,0)
375 (9,2):(4,-1):(2,1)
376 [4,pi]:[2,pi/2]:[2,pi/2]
377 [2,pi/2]:[4,pi]:[0.5,-(pi)/2]
378
379 &**;=
380 (2,0):(3,0):(8,0)
381 (3,0):(2,0):(9,0)
382 (2,3):(4,0):(-119,-120)
383 (0,0):(1,0):(0,0)
384 (0,0):(2,3):(0,0)
385 (1,0):(0,0):(1,0)
386 (1,0):(1,0):(1,0)
387 (1,0):(2,3):(1,0)
388 (2,3):(0,0):(1,0)
389 (2,3):(1,0):(2,3)
390
391 &Re
392 (3,4):3
393 (-3,4):-3
394 [1,pi/2]:0
395
396 &Im
397 (3,4):4
398 (3,-4):-4
399 [1,pi/2]:1
400
401 &abs
402 (3,4):5
403 (-3,4):5
404
405 &arg
406 [2,0]:0
407 [-2,0]:pi
408
409 &~
410 (4,5):(4,-5)
411 (-3,4):(-3,-4)
412 [2,pi/2]:[2,-(pi)/2]
413
414 &<
415 (3,4):(1,2):0
416 (3,4):(3,2):0
417 (3,4):(3,8):1
418 (4,4):(5,129):1
419
420 &==
421 (3,4):(4,5):0
422 (3,4):(3,5):0
423 (3,4):(2,4):0
424 (3,4):(3,4):1
425
426 &sqrt
427 -9:(0,3)
428 (-100,0):(0,10)
429 (16,-30):(5,-3)
430
431 &stringify_cartesian
432 (-100,0):"-100"
433 (0,1):"i"
434 (4,-3):"4-3i"
435 (4,0):"4"
436 (-4,0):"-4"
437 (-2,4):"-2+4i"
438 (-2,-1):"-2-i"
439
440 &stringify_polar
441 [-1, 0]:"[1,pi]"
442 [1, pi/3]:"[1,pi/3]"
443 [6, -2*pi/3]:"[6,-2pi/3]"
444 [0.5, -9*pi/11]:"[0.5,-9pi/11]"
445
446 { (4,3); [3,2]; (-3,4); (0,2); [2,1] }
447
448 |'z + ~z':'2*Re(z)'
449 |'z - ~z':'2*i*Im(z)'
450 |'z * ~z':'abs(z) * abs(z)'
451
452 { (0.5, 0); (-0.5, 0); (2,3); [3,2]; (-3,2); (0,2); 3; 1.2; (-3, 0); (-2, -1); [2,1] }
453
454 |'(root(z, 4))[1] ** 4':'z'
455 |'(root(z, 5))[3] ** 5':'z'
456 |'(root(z, 8))[7] ** 8':'z'
457 |'abs(z)':'r'
458 |'acot(z)':'acotan(z)'
459 |'acsc(z)':'acosec(z)'
460 |'acsc(z)':'asin(1 / z)'
461 |'asec(z)':'acos(1 / z)'
462 |'cbrt(z)':'cbrt(r) * exp(i * t/3)'
463 |'cos(acos(z))':'z'
464 |'addsq(cos(z), sin(z))':1
465 |'cos(z)':'cosh(i*z)'
466 |'subsq(cosh(z), sinh(z))':1
467 |'cot(acot(z))':'z'
468 |'cot(z)':'1 / tan(z)'
469 |'cot(z)':'cotan(z)'
470 |'csc(acsc(z))':'z'
471 |'csc(z)':'1 / sin(z)'
472 |'csc(z)':'cosec(z)'
473 |'exp(log(z))':'z'
474 |'exp(z)':'exp(a) * exp(i * b)'
475 |'ln(z)':'log(z)'
476 |'log(exp(z))':'z'
477 |'log(z)':'log(r) + i*t'
478 |'log10(z)':'log(z) / log(10)'
479 |'logn(z, 2)':'log(z) / log(2)'
480 |'logn(z, 3)':'log(z) / log(3)'
481 |'sec(asec(z))':'z'
482 |'sec(z)':'1 / cos(z)'
483 |'sin(asin(z))':'z'
484 |'sin(i * z)':'i * sinh(z)'
485 |'sqrt(z) * sqrt(z)':'z'
486 |'sqrt(z)':'sqrt(r) * exp(i * t/2)'
487 |'tan(atan(z))':'z'
488 |'z**z':'exp(z * log(z))'
489
490 { (1,1); [1,0.5]; (-2, -1); 2; -3; (-1,0.5); (0,0.5); 0.5; (2, 0); (-1, -2) }
491
492 |'cosh(acosh(z))':'z'
493 |'coth(acoth(z))':'z'
494 |'coth(z)':'1 / tanh(z)'
495 |'coth(z)':'cotanh(z)'
496 |'csch(acsch(z))':'z'
497 |'csch(z)':'1 / sinh(z)'
498 |'csch(z)':'cosech(z)'
499 |'sech(asech(z))':'z'
500 |'sech(z)':'1 / cosh(z)'
501 |'sinh(asinh(z))':'z'
502 |'tanh(atanh(z))':'z'
503
504 { (0.2,-0.4); [1,0.5]; -1.2; (-1,0.5); 0.5; (1.1, 0) }
505
506 |'acos(cos(z)) ** 2':'z * z'
507 |'acosh(cosh(z)) ** 2':'z * z'
508 |'acoth(z)':'acotanh(z)'
509 |'acoth(z)':'atanh(1 / z)'
510 |'acsch(z)':'acosech(z)'
511 |'acsch(z)':'asinh(1 / z)'
512 |'asech(z)':'acosh(1 / z)'
513 |'asin(sin(z))':'z'
514 |'asinh(sinh(z))':'z'
515 |'atan(tan(z))':'z'
516 |'atanh(tanh(z))':'z'
517
518 &log
519 (-2.0,0):(   0.69314718055995,  3.14159265358979)
520 (-1.0,0):(   0               ,  3.14159265358979)
521 (-0.5,0):(  -0.69314718055995,  3.14159265358979)
522 ( 0.5,0):(  -0.69314718055995,  0               )
523 ( 1.0,0):(   0               ,  0               )
524 ( 2.0,0):(   0.69314718055995,  0               )
525
526 &log
527 ( 2, 3):(    1.28247467873077,  0.98279372324733)
528 (-2, 3):(    1.28247467873077,  2.15879893034246)
529 (-2,-3):(    1.28247467873077, -2.15879893034246)
530 ( 2,-3):(    1.28247467873077, -0.98279372324733)
531
532 &sin
533 (-2.0,0):(  -0.90929742682568,  0               )
534 (-1.0,0):(  -0.84147098480790,  0               )
535 (-0.5,0):(  -0.47942553860420,  0               )
536 ( 0.0,0):(   0               ,  0               )
537 ( 0.5,0):(   0.47942553860420,  0               )
538 ( 1.0,0):(   0.84147098480790,  0               )
539 ( 2.0,0):(   0.90929742682568,  0               )
540
541 &sin
542 ( 2, 3):(  9.15449914691143, -4.16890695996656)
543 (-2, 3):( -9.15449914691143, -4.16890695996656)
544 (-2,-3):( -9.15449914691143,  4.16890695996656)
545 ( 2,-3):(  9.15449914691143,  4.16890695996656)
546
547 &cos
548 (-2.0,0):(  -0.41614683654714,  0               )
549 (-1.0,0):(   0.54030230586814,  0               )
550 (-0.5,0):(   0.87758256189037,  0               )
551 ( 0.0,0):(   1               ,  0               )
552 ( 0.5,0):(   0.87758256189037,  0               )
553 ( 1.0,0):(   0.54030230586814,  0               )
554 ( 2.0,0):(  -0.41614683654714,  0               )
555
556 &cos
557 ( 2, 3):( -4.18962569096881, -9.10922789375534)
558 (-2, 3):( -4.18962569096881,  9.10922789375534)
559 (-2,-3):( -4.18962569096881, -9.10922789375534)
560 ( 2,-3):( -4.18962569096881,  9.10922789375534)
561
562 &tan
563 (-2.0,0):(   2.18503986326152,  0               )
564 (-1.0,0):(  -1.55740772465490,  0               )
565 (-0.5,0):(  -0.54630248984379,  0               )
566 ( 0.0,0):(   0               ,  0               )
567 ( 0.5,0):(   0.54630248984379,  0               )
568 ( 1.0,0):(   1.55740772465490,  0               )
569 ( 2.0,0):(  -2.18503986326152,  0               )
570
571 &tan
572 ( 2, 3):( -0.00376402564150,  1.00323862735361)
573 (-2, 3):(  0.00376402564150,  1.00323862735361)
574 (-2,-3):(  0.00376402564150, -1.00323862735361)
575 ( 2,-3):( -0.00376402564150, -1.00323862735361)
576
577 &sec
578 (-2.0,0):(  -2.40299796172238,  0               )
579 (-1.0,0):(   1.85081571768093,  0               )
580 (-0.5,0):(   1.13949392732455,  0               )
581 ( 0.0,0):(   1               ,  0               )
582 ( 0.5,0):(   1.13949392732455,  0               )
583 ( 1.0,0):(   1.85081571768093,  0               )
584 ( 2.0,0):(  -2.40299796172238,  0               )
585
586 &sec
587 ( 2, 3):( -0.04167496441114,  0.09061113719624)
588 (-2, 3):( -0.04167496441114, -0.09061113719624)
589 (-2,-3):( -0.04167496441114,  0.09061113719624)
590 ( 2,-3):( -0.04167496441114, -0.09061113719624)
591
592 &csc
593 (-2.0,0):(  -1.09975017029462,  0               )
594 (-1.0,0):(  -1.18839510577812,  0               )
595 (-0.5,0):(  -2.08582964293349,  0               )
596 ( 0.5,0):(   2.08582964293349,  0               )
597 ( 1.0,0):(   1.18839510577812,  0               )
598 ( 2.0,0):(   1.09975017029462,  0               )
599
600 &csc
601 ( 2, 3):(  0.09047320975321,  0.04120098628857)
602 (-2, 3):( -0.09047320975321,  0.04120098628857)
603 (-2,-3):( -0.09047320975321, -0.04120098628857)
604 ( 2,-3):(  0.09047320975321, -0.04120098628857)
605
606 &cot
607 (-2.0,0):(   0.45765755436029,  0               )
608 (-1.0,0):(  -0.64209261593433,  0               )
609 (-0.5,0):(  -1.83048772171245,  0               )
610 ( 0.5,0):(   1.83048772171245,  0               )
611 ( 1.0,0):(   0.64209261593433,  0               )
612 ( 2.0,0):(  -0.45765755436029,  0               )
613
614 &cot
615 ( 2, 3):( -0.00373971037634, -0.99675779656936)
616 (-2, 3):(  0.00373971037634, -0.99675779656936)
617 (-2,-3):(  0.00373971037634,  0.99675779656936)
618 ( 2,-3):( -0.00373971037634,  0.99675779656936)
619
620 &asin
621 (-2.0,0):(  -1.57079632679490,  1.31695789692482)
622 (-1.0,0):(  -1.57079632679490,  0               )
623 (-0.5,0):(  -0.52359877559830,  0               )
624 ( 0.0,0):(   0               ,  0               )
625 ( 0.5,0):(   0.52359877559830,  0               )
626 ( 1.0,0):(   1.57079632679490,  0               )
627 ( 2.0,0):(   1.57079632679490, -1.31695789692482)
628
629 &asin
630 ( 2, 3):(  0.57065278432110,  1.98338702991654)
631 (-2, 3):( -0.57065278432110,  1.98338702991654)
632 (-2,-3):( -0.57065278432110, -1.98338702991654)
633 ( 2,-3):(  0.57065278432110, -1.98338702991654)
634
635 &acos
636 (-2.0,0):(   3.14159265358979, -1.31695789692482)
637 (-1.0,0):(   3.14159265358979,  0               )
638 (-0.5,0):(   2.09439510239320,  0               )
639 ( 0.0,0):(   1.57079632679490,  0               )
640 ( 0.5,0):(   1.04719755119660,  0               )
641 ( 1.0,0):(   0               ,  0               )
642 ( 2.0,0):(   0               ,  1.31695789692482)
643
644 &acos
645 ( 2, 3):(  1.00014354247380, -1.98338702991654)
646 (-2, 3):(  2.14144911111600, -1.98338702991654)
647 (-2,-3):(  2.14144911111600,  1.98338702991654)
648 ( 2,-3):(  1.00014354247380,  1.98338702991654)
649
650 &atan
651 (-2.0,0):(  -1.10714871779409,  0               )
652 (-1.0,0):(  -0.78539816339745,  0               )
653 (-0.5,0):(  -0.46364760900081,  0               )
654 ( 0.0,0):(   0               ,  0               )
655 ( 0.5,0):(   0.46364760900081,  0               )
656 ( 1.0,0):(   0.78539816339745,  0               )
657 ( 2.0,0):(   1.10714871779409,  0               )
658
659 &atan
660 ( 2, 3):(  1.40992104959658,  0.22907268296854)
661 (-2, 3):( -1.40992104959658,  0.22907268296854)
662 (-2,-3):( -1.40992104959658, -0.22907268296854)
663 ( 2,-3):(  1.40992104959658, -0.22907268296854)
664
665 &asec
666 (-2.0,0):(   2.09439510239320,  0               )
667 (-1.0,0):(   3.14159265358979,  0               )
668 (-0.5,0):(   3.14159265358979, -1.31695789692482)
669 ( 0.5,0):(   0               ,  1.31695789692482)
670 ( 1.0,0):(   0               ,  0               )
671 ( 2.0,0):(   1.04719755119660,  0               )
672
673 &asec
674 ( 2, 3):(  1.42041072246703,  0.23133469857397)
675 (-2, 3):(  1.72118193112276,  0.23133469857397)
676 (-2,-3):(  1.72118193112276, -0.23133469857397)
677 ( 2,-3):(  1.42041072246703, -0.23133469857397)
678
679 &acsc
680 (-2.0,0):(  -0.52359877559830,  0               )
681 (-1.0,0):(  -1.57079632679490,  0               )
682 (-0.5,0):(  -1.57079632679490,  1.31695789692482)
683 ( 0.5,0):(   1.57079632679490, -1.31695789692482)
684 ( 1.0,0):(   1.57079632679490,  0               )
685 ( 2.0,0):(   0.52359877559830,  0               )
686
687 &acsc
688 ( 2, 3):(  0.15038560432786, -0.23133469857397)
689 (-2, 3):( -0.15038560432786, -0.23133469857397)
690 (-2,-3):( -0.15038560432786,  0.23133469857397)
691 ( 2,-3):(  0.15038560432786,  0.23133469857397)
692
693 &acot
694 (-2.0,0):(  -0.46364760900081,  0               )
695 (-1.0,0):(  -0.78539816339745,  0               )
696 (-0.5,0):(  -1.10714871779409,  0               )
697 ( 0.5,0):(   1.10714871779409,  0               )
698 ( 1.0,0):(   0.78539816339745,  0               )
699 ( 2.0,0):(   0.46364760900081,  0               )
700
701 &acot
702 ( 2, 3):(  0.16087527719832, -0.22907268296854)
703 (-2, 3):( -0.16087527719832, -0.22907268296854)
704 (-2,-3):( -0.16087527719832,  0.22907268296854)
705 ( 2,-3):(  0.16087527719832,  0.22907268296854)
706
707 &sinh
708 (-2.0,0):(  -3.62686040784702,  0               )
709 (-1.0,0):(  -1.17520119364380,  0               )
710 (-0.5,0):(  -0.52109530549375,  0               )
711 ( 0.0,0):(   0               ,  0               )
712 ( 0.5,0):(   0.52109530549375,  0               )
713 ( 1.0,0):(   1.17520119364380,  0               )
714 ( 2.0,0):(   3.62686040784702,  0               )
715
716 &sinh
717 ( 2, 3):( -3.59056458998578,  0.53092108624852)
718 (-2, 3):(  3.59056458998578,  0.53092108624852)
719 (-2,-3):(  3.59056458998578, -0.53092108624852)
720 ( 2,-3):( -3.59056458998578, -0.53092108624852)
721
722 &cosh
723 (-2.0,0):(   3.76219569108363,  0               )
724 (-1.0,0):(   1.54308063481524,  0               )
725 (-0.5,0):(   1.12762596520638,  0               )
726 ( 0.0,0):(   1               ,  0               )
727 ( 0.5,0):(   1.12762596520638,  0               )
728 ( 1.0,0):(   1.54308063481524,  0               )
729 ( 2.0,0):(   3.76219569108363,  0               )
730
731 &cosh
732 ( 2, 3):( -3.72454550491532,  0.51182256998738)
733 (-2, 3):( -3.72454550491532, -0.51182256998738)
734 (-2,-3):( -3.72454550491532,  0.51182256998738)
735 ( 2,-3):( -3.72454550491532, -0.51182256998738)
736
737 &tanh
738 (-2.0,0):(  -0.96402758007582,  0               )
739 (-1.0,0):(  -0.76159415595576,  0               )
740 (-0.5,0):(  -0.46211715726001,  0               )
741 ( 0.0,0):(   0               ,  0               )
742 ( 0.5,0):(   0.46211715726001,  0               )
743 ( 1.0,0):(   0.76159415595576,  0               )
744 ( 2.0,0):(   0.96402758007582,  0               )
745
746 &tanh
747 ( 2, 3):(  0.96538587902213, -0.00988437503832)
748 (-2, 3):( -0.96538587902213, -0.00988437503832)
749 (-2,-3):( -0.96538587902213,  0.00988437503832)
750 ( 2,-3):(  0.96538587902213,  0.00988437503832)
751
752 &sech
753 (-2.0,0):(   0.26580222883408,  0               )
754 (-1.0,0):(   0.64805427366389,  0               )
755 (-0.5,0):(   0.88681888397007,  0               )
756 ( 0.0,0):(   1               ,  0               )
757 ( 0.5,0):(   0.88681888397007,  0               )
758 ( 1.0,0):(   0.64805427366389,  0               )
759 ( 2.0,0):(   0.26580222883408,  0               )
760
761 &sech
762 ( 2, 3):( -0.26351297515839, -0.03621163655877)
763 (-2, 3):( -0.26351297515839,  0.03621163655877)
764 (-2,-3):( -0.26351297515839, -0.03621163655877)
765 ( 2,-3):( -0.26351297515839,  0.03621163655877)
766
767 &csch
768 (-2.0,0):(  -0.27572056477178,  0               )
769 (-1.0,0):(  -0.85091812823932,  0               )
770 (-0.5,0):(  -1.91903475133494,  0               )
771 ( 0.5,0):(   1.91903475133494,  0               )
772 ( 1.0,0):(   0.85091812823932,  0               )
773 ( 2.0,0):(   0.27572056477178,  0               )
774
775 &csch
776 ( 2, 3):( -0.27254866146294, -0.04030057885689)
777 (-2, 3):(  0.27254866146294, -0.04030057885689)
778 (-2,-3):(  0.27254866146294,  0.04030057885689)
779 ( 2,-3):( -0.27254866146294,  0.04030057885689)
780
781 &coth
782 (-2.0,0):(  -1.03731472072755,  0               )
783 (-1.0,0):(  -1.31303528549933,  0               )
784 (-0.5,0):(  -2.16395341373865,  0               )
785 ( 0.5,0):(   2.16395341373865,  0               )
786 ( 1.0,0):(   1.31303528549933,  0               )
787 ( 2.0,0):(   1.03731472072755,  0               )
788
789 &coth
790 ( 2, 3):(  1.03574663776500,  0.01060478347034)
791 (-2, 3):( -1.03574663776500,  0.01060478347034)
792 (-2,-3):( -1.03574663776500, -0.01060478347034)
793 ( 2,-3):(  1.03574663776500, -0.01060478347034)
794
795 &asinh
796 (-2.0,0):(  -1.44363547517881,  0               )
797 (-1.0,0):(  -0.88137358701954,  0               )
798 (-0.5,0):(  -0.48121182505960,  0               )
799 ( 0.0,0):(   0               ,  0               )
800 ( 0.5,0):(   0.48121182505960,  0               )
801 ( 1.0,0):(   0.88137358701954,  0               )
802 ( 2.0,0):(   1.44363547517881,  0               )
803
804 &asinh
805 ( 2, 3):(  1.96863792579310,  0.96465850440760)
806 (-2, 3):( -1.96863792579310,  0.96465850440761)
807 (-2,-3):( -1.96863792579310, -0.96465850440761)
808 ( 2,-3):(  1.96863792579310, -0.96465850440760)
809
810 &acosh
811 (-2.0,0):(  -1.31695789692482,  3.14159265358979)
812 (-1.0,0):(   0,                 3.14159265358979)
813 (-0.5,0):(   0,                 2.09439510239320)
814 ( 0.0,0):(   0,                 1.57079632679490)
815 ( 0.5,0):(   0,                 1.04719755119660)
816 ( 1.0,0):(   0               ,  0               )
817 ( 2.0,0):(   1.31695789692482,  0               )
818
819 &acosh
820 ( 2, 3):(  1.98338702991654,  1.00014354247380)
821 (-2, 3):( -1.98338702991653, -2.14144911111600)
822 (-2,-3):( -1.98338702991653,  2.14144911111600)
823 ( 2,-3):(  1.98338702991654, -1.00014354247380)
824
825 &atanh
826 (-2.0,0):(  -0.54930614433405,  1.57079632679490)
827 (-0.5,0):(  -0.54930614433405,  0               )
828 ( 0.0,0):(   0               ,  0               )
829 ( 0.5,0):(   0.54930614433405,  0               )
830 ( 2.0,0):(   0.54930614433405,  1.57079632679490)
831
832 &atanh
833 ( 2, 3):(  0.14694666622553,  1.33897252229449)
834 (-2, 3):( -0.14694666622553,  1.33897252229449)
835 (-2,-3):( -0.14694666622553, -1.33897252229449)
836 ( 2,-3):(  0.14694666622553, -1.33897252229449)
837
838 &asech
839 (-2.0,0):(   0               , 2.09439510239320)
840 (-1.0,0):(   0               , 3.14159265358979)
841 (-0.5,0):(  -1.31695789692482, 3.14159265358979)
842 ( 0.5,0):(   1.31695789692482, 0               )
843 ( 1.0,0):(   0               , 0               )
844 ( 2.0,0):(   0               , 1.04719755119660)
845
846 &asech
847 ( 2, 3):(  0.23133469857397, -1.42041072246703)
848 (-2, 3):( -0.23133469857397,  1.72118193112276)
849 (-2,-3):( -0.23133469857397, -1.72118193112276)
850 ( 2,-3):(  0.23133469857397,  1.42041072246703)
851
852 &acsch
853 (-2.0,0):(  -0.48121182505960, 0               )
854 (-1.0,0):(  -0.88137358701954, 0               )
855 (-0.5,0):(  -1.44363547517881, 0               )
856 ( 0.5,0):(   1.44363547517881, 0               )
857 ( 1.0,0):(   0.88137358701954, 0               )
858 ( 2.0,0):(   0.48121182505960, 0               )
859
860 &acsch
861 ( 2, 3):(  0.15735549884499, -0.22996290237721)
862 (-2, 3):( -0.15735549884499, -0.22996290237721)
863 (-2,-3):( -0.15735549884499,  0.22996290237721)
864 ( 2,-3):(  0.15735549884499,  0.22996290237721)
865
866 &acoth
867 (-2.0,0):(  -0.54930614433405, 0               )
868 (-0.5,0):(  -0.54930614433405, 1.57079632679490)
869 ( 0.5,0):(   0.54930614433405, 1.57079632679490)
870 ( 2.0,0):(   0.54930614433405, 0               )
871
872 &acoth
873 ( 2, 3):(  0.14694666622553, -0.23182380450040)
874 (-2, 3):( -0.14694666622553, -0.23182380450040)
875 (-2,-3):( -0.14694666622553,  0.23182380450040)
876 ( 2,-3):(  0.14694666622553,  0.23182380450040)
877
878 # eof
879