POSIX BC2000 port from perl-mvs:
[p5sagit/p5-mst-13.2.git] / t / lib / complex.t
CommitLineData
89d0527d 1#!./perl
2
fb73857a 3# $RCSfile: complex.t,v $
89d0527d 4#
5aabfad6 5# Regression tests for the Math::Complex pacakge
b42d0ec9 6# -- Raphael Manfredi since Sep 1996
7# -- Jarkko Hietaniemi since Mar 1997
8# -- Daniel S. Lewart since Sep 1997
5aabfad6 9
89d0527d 10BEGIN {
11 chdir 't' if -d 't';
12 @INC = '../lib';
13}
5aabfad6 14
89d0527d 15use Math::Complex;
16
b42d0ec9 17$VERSION = sprintf("%s", q$Id: complex.t,v 1.8 1998/02/05 16:03:39 jhi Exp $ =~ /(\d+\.d+)/);
18
fb73857a 19my ($args, $op, $target, $test, $test_set, $try, $val, $zvalue, @set, @val);
20
89d0527d 21$test = 0;
22$| = 1;
fb73857a 23my @script = (
24 'my ($res, $s0,$s1,$s2,$s3,$s4,$s5,$s6,$s7,$s8,$s9,$s10, $z0,$z1,$z2);' .
25 "\n\n"
26);
b42d0ec9 27my $eps = 1e-13;
89d0527d 28
d09ae4e6 29if ($^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
89d0527d 34while (<DATA>) {
0c721ce2 35 s/^\s+//;
36 next if $_ eq '' || /^\#/;
37 chomp;
38 $test_set = 0; # Assume not a test over a set of values
0e505df1 39 if (/^&(.+)/) {
89d0527d 40 $op = $1;
41 next;
42 }
0e505df1 43 elsif (/^\{(.+)\}/) {
89d0527d 44 set($1, \@set, \@val);
45 next;
46 }
47 elsif (s/^\|//) {
0c721ce2 48 $test_set = 1; # Requests we loop over the set...
89d0527d 49 }
50 my @args = split(/:/);
0c721ce2 51 if ($test_set == 1) {
89d0527d 52 my $i;
53 for ($i = 0; $i < @set; $i++) {
0c721ce2 54 # complex number
55 $target = $set[$i];
56 # textual value as found in set definition
57 $zvalue = $val[$i];
89d0527d 58 test($zvalue, $target, @args);
59 }
60 } else {
61 test($op, undef, @args);
62 }
63}
64
b42d0ec9 65#
66
67sub test_mutators {
68 my $op;
69
70 $test++;
71push(@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;
77EOT
78 push(@script, qq(print "ok $test\\n"}\n));
79
80 $test++;
81push(@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;
89EOT
90 push(@script, qq(print "ok $test\\n"}\n));
91
92 $test++;
93push(@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;
101EOT
102 push(@script, qq(print "ok $test\\n"}\n));
103}
104
105test_mutators();
106
107my $constants = '
108my $i = cplx(0, 1);
109my $pi = cplx(pi, 0);
110my $pii = cplx(0, pi);
111my $pip2 = cplx(pi/2, 0);
112my $zero = cplx(0, 0);
113';
114
115push(@script, $constants);
116
117
5cd24f17 118# test the divbyzeros
119
0e505df1 120sub test_dbz {
121 for my $op (@_) {
122 $test++;
123
b42d0ec9 124 push(@script, <<EOT);
125eval '$op';
126print 'not ' unless (\$@ =~ /Division by zero/);
127EOT
128 push(@script, qq(print "ok $test\\n";\n));
0e505df1 129 }
130}
131
8c03c583 132# test the logofzeros
133
134sub test_loz {
135 for my $op (@_) {
136 $test++;
137
b42d0ec9 138 push(@script, <<EOT);
139eval '$op';
140print 'not ' unless (\$@ =~ /Logarithm of zero/);
141EOT
142 push(@script, qq(print "ok $test\\n";\n));
8c03c583 143 }
144}
145
5cd24f17 146test_dbz(
147 'i/0',
b42d0ec9 148 'acot(0)',
149 'acot(+$i)',
150# 'acoth(-1)', # Log of zero.
151 'acoth(0)',
152 'acoth(+1)',
5cd24f17 153 'acsc(0)',
5cd24f17 154 'acsch(0)',
b42d0ec9 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)',
8c03c583 167 );
168
169test_loz(
fb73857a 170 'log($zero)',
b42d0ec9 171 'acot(-$i)',
8c03c583 172 'atanh(-1)',
173 'acoth(-1)',
5cd24f17 174 );
175
0e505df1 176# test the 0**0
177
178sub test_ztz {
b42d0ec9 179 $test++;
0e505df1 180
b42d0ec9 181 push(@script, <<'EOT');
182eval 'cplx(0)**cplx(0)';
183print 'not ' unless ($@ =~ /zero raised to the zeroth/);
184EOT
185 push(@script, qq(print "ok $test\\n";\n));
0e505df1 186}
187
188test_ztz;
189
190# test the bad roots
191
192sub test_broot {
5cd24f17 193 for my $op (@_) {
194 $test++;
195
b42d0ec9 196 push(@script, <<EOT);
197eval 'root(2, $op)';
198print 'not ' unless (\$@ =~ /root must be/);
199EOT
200 push(@script, qq(print "ok $test\\n";\n));
5cd24f17 201 }
202}
203
0e505df1 204test_broot(qw(-3 -2.1 0 0.99));
205
89d0527d 206print "1..$test\n";
fe82cf6e 207eval join '', @script;
89d0527d 208die $@ if $@;
209
0e505df1 210sub abop {
211 my ($op) = @_;
212
213 push(@script, qq(print "# $op=\n";));
214}
215
89d0527d 216sub test {
217 my ($op, $z, @args) = @_;
0e505df1 218 my ($baop) = 0;
89d0527d 219 $test++;
220 my $i;
0e505df1 221 $baop = 1 if ($op =~ s/;=$//);
89d0527d 222 for ($i = 0; $i < @args; $i++) {
223 $val = value($args[$i]);
fe82cf6e 224 push @script, "\$z$i = $val;\n";
89d0527d 225 }
226 if (defined $z) {
227 $args = "'$op'"; # Really the value
0c721ce2 228 $try = "abs(\$z0 - \$z1) <= $eps ? \$z1 : \$z0";
fe82cf6e 229 push @script, "\$res = $try; ";
230 push @script, "check($test, $args[0], \$res, \$z$#args, $args);\n";
89d0527d 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 }
fe82cf6e 240 push @script, "\$res = $try; ";
241 push @script, "check($test, '$try', \$res, \$z$#args, $args);\n";
0e505df1 242 if (@args > 2 and $baop) { # binary assignment ops
243 $test++;
244 # check the op= works
245 push @script, <<EOB;
246{
fb73857a 247 my \$za = cplx(ref \$z0 ? \@{\$z0->cartesian} : (\$z0, 0));
0e505df1 248
249 my (\$z1r, \$z1i) = ref \$z1 ? \@{\$z1->cartesian} : (\$z1, 0);
250
fb73857a 251 my \$zb = cplx(\$z1r, \$z1i);
0e505df1 252
253 \$za $op= \$zb;
254 my (\$zbr, \$zbi) = \@{\$zb->cartesian};
255
256 check($test, '\$z0 $op= \$z1', \$za, \$z$#args, $args);
257EOB
258 $test++;
259 # check that the rhs has not changed
260 push @script, qq(print "not " unless (\$zbr == \$z1r and \$zbi == \$z1i););
b42d0ec9 261 push @script, qq(print "ok $test\\n";\n);
0e505df1 262 push @script, "}\n";
263 }
89d0527d 264 }
265}
266
267sub 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]);
fe82cf6e 277 push @script, "\$s$i = $val;\n";
278 push @{$setref}, "\$s$i";
89d0527d 279 }
280}
281
282sub value {
283 local ($_) = @_;
284 if (/^\s*\((.*),(.*)\)/) {
285 return "cplx($1,$2)";
286 }
b42d0ec9 287 elsif (/^\s*([\-\+]?(?:\d+(\.\d+)?|\.\d+)(?:[e[\-\+]\d+])?)/) {
288 return "cplx($1,0)";
289 }
89d0527d 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
308sub check {
309 my ($test, $try, $got, $expected, @z) = @_;
0c721ce2 310
311# print "# @_\n";
312
313 if ("$got" eq "$expected"
314 ||
315 ($expected =~ /^-?\d/ && $got == $expected)
316 ||
317 (abs($got - $expected) < $eps)
318 ) {
89d0527d 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}
fb73857a 326
327sub addsq {
328 my ($z1, $z2) = @_;
329 return ($z1 + i*$z2) * ($z1 - i*$z2);
330}
331
332sub subsq {
333 my ($z1, $z2) = @_;
334 return ($z1 + $z2) * ($z1 - $z2);
335}
336
89d0527d 337__END__
0e505df1 338&+;=
89d0527d 339(3,4):(3,4):(6,8)
340(-3,4):(3,-4):(0,0)
341(3,4):-3:(0,4)
3421:(4,2):(5,2)
343[2,0]:[2,pi]:(0,0)
344
345&++
346(2,1):(3,1)
347
0e505df1 348&-;=
89d0527d 349(2,3):(-2,-3)
350[2,pi/2]:[2,-(pi)/2]
3512:[2,0]:(0,0)
352[3,0]:2:(1,0)
3533:(4,5):(-1,-5)
354(4,5):3:(1,5)
0e505df1 355(2,1):(3,5):(-1,-4)
89d0527d 356
357&--
358(1,2):(0,2)
359[2,pi]:[3,pi]
360
0e505df1 361&*;=
89d0527d 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]
3652:(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
0e505df1 370&/;=
89d0527d 371(3,4):(3,4):(1,0)
372(4,-5):1:(4,-5)
3731:(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
0e505df1 379&**;=
380(2,0):(3,0):(8,0)
381(3,0):(2,0):(9,0)
382(2,3):(4,0):(-119,-120)
ace5de91 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)
0e505df1 390
0c721ce2 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
89d0527d 401&abs
402(3,4):5
403(-3,4):5
404
0c721ce2 405&arg
406[2,0]:0
407[-2,0]:pi
408
89d0527d 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
0c721ce2 427-9:(0,3)
89d0527d 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
8c03c583 452{ (0.5, 0); (-0.5, 0); (2,3); [3,2]; (-3,2); (0,2); 3; 1.2; (-3, 0); (-2, -1); [2,1] }
89d0527d 453
0c721ce2 454|'(root(z, 4))[1] ** 4':'z'
455|'(root(z, 5))[3] ** 5':'z'
456|'(root(z, 8))[7] ** 8':'z'
89d0527d 457|'abs(z)':'r'
0c721ce2 458|'acot(z)':'acotan(z)'
459|'acsc(z)':'acosec(z)'
fb73857a 460|'acsc(z)':'asin(1 / z)'
461|'asec(z)':'acos(1 / z)'
89d0527d 462|'cbrt(z)':'cbrt(r) * exp(i * t/3)'
89d0527d 463|'cos(acos(z))':'z'
fb73857a 464|'addsq(cos(z), sin(z))':1
89d0527d 465|'cos(z)':'cosh(i*z)'
fb73857a 466|'subsq(cosh(z), sinh(z))':1
0c721ce2 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)'
89d0527d 473|'exp(log(z))':'z'
0c721ce2 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'
89d0527d 478|'log10(z)':'log(z) / log(10)'
89d0527d 479|'logn(z, 2)':'log(z) / log(2)'
0c721ce2 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))'
89d0527d 489
0c721ce2 490{ (1,1); [1,0.5]; (-2, -1); 2; -3; (-1,0.5); (0,0.5); 0.5; (2, 0); (-1, -2) }
89d0527d 491
89d0527d 492|'cosh(acosh(z))':'z'
0c721ce2 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'
89d0527d 502|'tanh(atanh(z))':'z'
89d0527d 503
0c721ce2 504{ (0.2,-0.4); [1,0.5]; -1.2; (-1,0.5); 0.5; (1.1, 0) }
89d0527d 505
89d0527d 506|'acos(cos(z)) ** 2':'z * z'
89d0527d 507|'acosh(cosh(z)) ** 2':'z * z'
0c721ce2 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'
89d0527d 516|'atanh(tanh(z))':'z'
517
fb73857a 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
0c721ce2 532&sin
8c03c583 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
0c721ce2 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
8c03c583 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
0c721ce2 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
8c03c583 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
0c721ce2 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
8c03c583 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
0c721ce2 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
8c03c583 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
0c721ce2 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
8c03c583 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
0c721ce2 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
8c03c583 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
0c721ce2 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
8c03c583 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
0c721ce2 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
8c03c583 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
0c721ce2 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
8c03c583 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
0c721ce2 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
8c03c583 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
0c721ce2 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
8c03c583 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
0c721ce2 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
8c03c583 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
0c721ce2 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
8c03c583 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
0c721ce2 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
8c03c583 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
0c721ce2 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
8c03c583 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
0c721ce2 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
8c03c583 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
0c721ce2 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
8c03c583 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
0c721ce2 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
8c03c583 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
0c721ce2 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
8c03c583 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
0c721ce2 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
8c03c583 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
0c721ce2 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
8c03c583 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
0c721ce2 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
8c03c583 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
0c721ce2 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
8c03c583 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
0c721ce2 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
fb73857a 879