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