add $AutoLoader::VERSION
[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
2820d885 17my $VERSION = sprintf("%s", q$Id: complex.t,v 1.9 1998/11/01 00:00:00 dsl Exp $ =~ /(\d+\.d+)/);
b42d0ec9 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 bad roots
177
178sub test_broot {
5cd24f17 179 for my $op (@_) {
180 $test++;
181
b42d0ec9 182 push(@script, <<EOT);
183eval 'root(2, $op)';
184print 'not ' unless (\$@ =~ /root must be/);
185EOT
186 push(@script, qq(print "ok $test\\n";\n));
5cd24f17 187 }
188}
189
0e505df1 190test_broot(qw(-3 -2.1 0 0.99));
191
89d0527d 192print "1..$test\n";
fe82cf6e 193eval join '', @script;
89d0527d 194die $@ if $@;
195
0e505df1 196sub abop {
197 my ($op) = @_;
198
199 push(@script, qq(print "# $op=\n";));
200}
201
89d0527d 202sub test {
203 my ($op, $z, @args) = @_;
0e505df1 204 my ($baop) = 0;
89d0527d 205 $test++;
206 my $i;
0e505df1 207 $baop = 1 if ($op =~ s/;=$//);
89d0527d 208 for ($i = 0; $i < @args; $i++) {
209 $val = value($args[$i]);
fe82cf6e 210 push @script, "\$z$i = $val;\n";
89d0527d 211 }
212 if (defined $z) {
213 $args = "'$op'"; # Really the value
0c721ce2 214 $try = "abs(\$z0 - \$z1) <= $eps ? \$z1 : \$z0";
fe82cf6e 215 push @script, "\$res = $try; ";
216 push @script, "check($test, $args[0], \$res, \$z$#args, $args);\n";
89d0527d 217 } else {
218 my ($try, $args);
219 if (@args == 2) {
220 $try = "$op \$z0";
221 $args = "'$args[0]'";
222 } else {
223 $try = ($op =~ /^\w/) ? "$op(\$z0, \$z1)" : "\$z0 $op \$z1";
224 $args = "'$args[0]', '$args[1]'";
225 }
fe82cf6e 226 push @script, "\$res = $try; ";
227 push @script, "check($test, '$try', \$res, \$z$#args, $args);\n";
0e505df1 228 if (@args > 2 and $baop) { # binary assignment ops
229 $test++;
230 # check the op= works
231 push @script, <<EOB;
232{
fb73857a 233 my \$za = cplx(ref \$z0 ? \@{\$z0->cartesian} : (\$z0, 0));
0e505df1 234
235 my (\$z1r, \$z1i) = ref \$z1 ? \@{\$z1->cartesian} : (\$z1, 0);
236
fb73857a 237 my \$zb = cplx(\$z1r, \$z1i);
0e505df1 238
239 \$za $op= \$zb;
240 my (\$zbr, \$zbi) = \@{\$zb->cartesian};
241
242 check($test, '\$z0 $op= \$z1', \$za, \$z$#args, $args);
243EOB
244 $test++;
245 # check that the rhs has not changed
246 push @script, qq(print "not " unless (\$zbr == \$z1r and \$zbi == \$z1i););
b42d0ec9 247 push @script, qq(print "ok $test\\n";\n);
0e505df1 248 push @script, "}\n";
249 }
89d0527d 250 }
251}
252
253sub set {
254 my ($set, $setref, $valref) = @_;
255 @{$setref} = ();
256 @{$valref} = ();
257 my @set = split(/;\s*/, $set);
258 my @res;
259 my $i;
260 for ($i = 0; $i < @set; $i++) {
261 push(@{$valref}, $set[$i]);
262 my $val = value($set[$i]);
fe82cf6e 263 push @script, "\$s$i = $val;\n";
264 push @{$setref}, "\$s$i";
89d0527d 265 }
266}
267
268sub value {
269 local ($_) = @_;
270 if (/^\s*\((.*),(.*)\)/) {
271 return "cplx($1,$2)";
272 }
b42d0ec9 273 elsif (/^\s*([\-\+]?(?:\d+(\.\d+)?|\.\d+)(?:[e[\-\+]\d+])?)/) {
274 return "cplx($1,0)";
275 }
89d0527d 276 elsif (/^\s*\[(.*),(.*)\]/) {
277 return "cplxe($1,$2)";
278 }
279 elsif (/^\s*'(.*)'/) {
280 my $ex = $1;
281 $ex =~ s/\bz\b/$target/g;
282 $ex =~ s/\br\b/abs($target)/g;
283 $ex =~ s/\bt\b/arg($target)/g;
284 $ex =~ s/\ba\b/Re($target)/g;
285 $ex =~ s/\bb\b/Im($target)/g;
286 return $ex;
287 }
288 elsif (/^\s*"(.*)"/) {
289 return "\"$1\"";
290 }
291 return $_;
292}
293
294sub check {
295 my ($test, $try, $got, $expected, @z) = @_;
0c721ce2 296
297# print "# @_\n";
298
299 if ("$got" eq "$expected"
300 ||
301 ($expected =~ /^-?\d/ && $got == $expected)
302 ||
303 (abs($got - $expected) < $eps)
304 ) {
89d0527d 305 print "ok $test\n";
306 } else {
307 print "not ok $test\n";
308 my $args = (@z == 1) ? "z = $z[0]" : "z0 = $z[0], z1 = $z[1]";
309 print "# '$try' expected: '$expected' got: '$got' for $args\n";
310 }
311}
fb73857a 312
313sub addsq {
314 my ($z1, $z2) = @_;
315 return ($z1 + i*$z2) * ($z1 - i*$z2);
316}
317
318sub subsq {
319 my ($z1, $z2) = @_;
320 return ($z1 + $z2) * ($z1 - $z2);
321}
322
89d0527d 323__END__
0e505df1 324&+;=
89d0527d 325(3,4):(3,4):(6,8)
326(-3,4):(3,-4):(0,0)
327(3,4):-3:(0,4)
3281:(4,2):(5,2)
329[2,0]:[2,pi]:(0,0)
330
331&++
332(2,1):(3,1)
333
0e505df1 334&-;=
89d0527d 335(2,3):(-2,-3)
336[2,pi/2]:[2,-(pi)/2]
3372:[2,0]:(0,0)
338[3,0]:2:(1,0)
3393:(4,5):(-1,-5)
340(4,5):3:(1,5)
0e505df1 341(2,1):(3,5):(-1,-4)
89d0527d 342
343&--
344(1,2):(0,2)
345[2,pi]:[3,pi]
346
0e505df1 347&*;=
89d0527d 348(0,1):(0,1):(-1,0)
349(4,5):(1,0):(4,5)
350[2,2*pi/3]:(1,0):[2,2*pi/3]
3512:(0,1):(0,2)
352(0,1):3:(0,3)
353(0,1):(4,1):(-1,4)
354(2,1):(4,-1):(9,2)
355
0e505df1 356&/;=
89d0527d 357(3,4):(3,4):(1,0)
358(4,-5):1:(4,-5)
3591:(0,1):(0,-1)
360(0,6):(0,2):(3,0)
361(9,2):(4,-1):(2,1)
362[4,pi]:[2,pi/2]:[2,pi/2]
363[2,pi/2]:[4,pi]:[0.5,-(pi)/2]
364
0e505df1 365&**;=
366(2,0):(3,0):(8,0)
367(3,0):(2,0):(9,0)
368(2,3):(4,0):(-119,-120)
ace5de91 369(0,0):(1,0):(0,0)
370(0,0):(2,3):(0,0)
371(1,0):(0,0):(1,0)
372(1,0):(1,0):(1,0)
373(1,0):(2,3):(1,0)
374(2,3):(0,0):(1,0)
375(2,3):(1,0):(2,3)
2820d885 376(0,0):(0,0):(1,0)
0e505df1 377
0c721ce2 378&Re
379(3,4):3
380(-3,4):-3
381[1,pi/2]:0
382
383&Im
384(3,4):4
385(3,-4):-4
386[1,pi/2]:1
387
89d0527d 388&abs
389(3,4):5
390(-3,4):5
391
0c721ce2 392&arg
393[2,0]:0
394[-2,0]:pi
395
89d0527d 396&~
397(4,5):(4,-5)
398(-3,4):(-3,-4)
399[2,pi/2]:[2,-(pi)/2]
400
401&<
402(3,4):(1,2):0
403(3,4):(3,2):0
404(3,4):(3,8):1
405(4,4):(5,129):1
406
407&==
408(3,4):(4,5):0
409(3,4):(3,5):0
410(3,4):(2,4):0
411(3,4):(3,4):1
412
413&sqrt
0c721ce2 414-9:(0,3)
89d0527d 415(-100,0):(0,10)
416(16,-30):(5,-3)
417
418&stringify_cartesian
419(-100,0):"-100"
420(0,1):"i"
421(4,-3):"4-3i"
422(4,0):"4"
423(-4,0):"-4"
424(-2,4):"-2+4i"
425(-2,-1):"-2-i"
426
427&stringify_polar
428[-1, 0]:"[1,pi]"
429[1, pi/3]:"[1,pi/3]"
430[6, -2*pi/3]:"[6,-2pi/3]"
431[0.5, -9*pi/11]:"[0.5,-9pi/11]"
432
433{ (4,3); [3,2]; (-3,4); (0,2); [2,1] }
434
435|'z + ~z':'2*Re(z)'
436|'z - ~z':'2*i*Im(z)'
437|'z * ~z':'abs(z) * abs(z)'
438
8c03c583 439{ (0.5, 0); (-0.5, 0); (2,3); [3,2]; (-3,2); (0,2); 3; 1.2; (-3, 0); (-2, -1); [2,1] }
89d0527d 440
0c721ce2 441|'(root(z, 4))[1] ** 4':'z'
442|'(root(z, 5))[3] ** 5':'z'
443|'(root(z, 8))[7] ** 8':'z'
89d0527d 444|'abs(z)':'r'
0c721ce2 445|'acot(z)':'acotan(z)'
446|'acsc(z)':'acosec(z)'
fb73857a 447|'acsc(z)':'asin(1 / z)'
448|'asec(z)':'acos(1 / z)'
89d0527d 449|'cbrt(z)':'cbrt(r) * exp(i * t/3)'
89d0527d 450|'cos(acos(z))':'z'
fb73857a 451|'addsq(cos(z), sin(z))':1
89d0527d 452|'cos(z)':'cosh(i*z)'
fb73857a 453|'subsq(cosh(z), sinh(z))':1
0c721ce2 454|'cot(acot(z))':'z'
455|'cot(z)':'1 / tan(z)'
456|'cot(z)':'cotan(z)'
457|'csc(acsc(z))':'z'
458|'csc(z)':'1 / sin(z)'
459|'csc(z)':'cosec(z)'
89d0527d 460|'exp(log(z))':'z'
0c721ce2 461|'exp(z)':'exp(a) * exp(i * b)'
462|'ln(z)':'log(z)'
463|'log(exp(z))':'z'
464|'log(z)':'log(r) + i*t'
89d0527d 465|'log10(z)':'log(z) / log(10)'
89d0527d 466|'logn(z, 2)':'log(z) / log(2)'
0c721ce2 467|'logn(z, 3)':'log(z) / log(3)'
468|'sec(asec(z))':'z'
469|'sec(z)':'1 / cos(z)'
470|'sin(asin(z))':'z'
471|'sin(i * z)':'i * sinh(z)'
472|'sqrt(z) * sqrt(z)':'z'
473|'sqrt(z)':'sqrt(r) * exp(i * t/2)'
474|'tan(atan(z))':'z'
475|'z**z':'exp(z * log(z))'
89d0527d 476
0c721ce2 477{ (1,1); [1,0.5]; (-2, -1); 2; -3; (-1,0.5); (0,0.5); 0.5; (2, 0); (-1, -2) }
89d0527d 478
89d0527d 479|'cosh(acosh(z))':'z'
0c721ce2 480|'coth(acoth(z))':'z'
481|'coth(z)':'1 / tanh(z)'
482|'coth(z)':'cotanh(z)'
483|'csch(acsch(z))':'z'
484|'csch(z)':'1 / sinh(z)'
485|'csch(z)':'cosech(z)'
486|'sech(asech(z))':'z'
487|'sech(z)':'1 / cosh(z)'
488|'sinh(asinh(z))':'z'
89d0527d 489|'tanh(atanh(z))':'z'
89d0527d 490
0c721ce2 491{ (0.2,-0.4); [1,0.5]; -1.2; (-1,0.5); 0.5; (1.1, 0) }
89d0527d 492
89d0527d 493|'acos(cos(z)) ** 2':'z * z'
89d0527d 494|'acosh(cosh(z)) ** 2':'z * z'
0c721ce2 495|'acoth(z)':'acotanh(z)'
496|'acoth(z)':'atanh(1 / z)'
497|'acsch(z)':'acosech(z)'
498|'acsch(z)':'asinh(1 / z)'
499|'asech(z)':'acosh(1 / z)'
500|'asin(sin(z))':'z'
501|'asinh(sinh(z))':'z'
502|'atan(tan(z))':'z'
89d0527d 503|'atanh(tanh(z))':'z'
504
fb73857a 505&log
506(-2.0,0):( 0.69314718055995, 3.14159265358979)
507(-1.0,0):( 0 , 3.14159265358979)
508(-0.5,0):( -0.69314718055995, 3.14159265358979)
509( 0.5,0):( -0.69314718055995, 0 )
510( 1.0,0):( 0 , 0 )
511( 2.0,0):( 0.69314718055995, 0 )
512
513&log
514( 2, 3):( 1.28247467873077, 0.98279372324733)
515(-2, 3):( 1.28247467873077, 2.15879893034246)
516(-2,-3):( 1.28247467873077, -2.15879893034246)
517( 2,-3):( 1.28247467873077, -0.98279372324733)
518
0c721ce2 519&sin
8c03c583 520(-2.0,0):( -0.90929742682568, 0 )
521(-1.0,0):( -0.84147098480790, 0 )
522(-0.5,0):( -0.47942553860420, 0 )
523( 0.0,0):( 0 , 0 )
524( 0.5,0):( 0.47942553860420, 0 )
525( 1.0,0):( 0.84147098480790, 0 )
526( 2.0,0):( 0.90929742682568, 0 )
527
528&sin
0c721ce2 529( 2, 3):( 9.15449914691143, -4.16890695996656)
530(-2, 3):( -9.15449914691143, -4.16890695996656)
531(-2,-3):( -9.15449914691143, 4.16890695996656)
532( 2,-3):( 9.15449914691143, 4.16890695996656)
533
534&cos
8c03c583 535(-2.0,0):( -0.41614683654714, 0 )
536(-1.0,0):( 0.54030230586814, 0 )
537(-0.5,0):( 0.87758256189037, 0 )
538( 0.0,0):( 1 , 0 )
539( 0.5,0):( 0.87758256189037, 0 )
540( 1.0,0):( 0.54030230586814, 0 )
541( 2.0,0):( -0.41614683654714, 0 )
542
543&cos
0c721ce2 544( 2, 3):( -4.18962569096881, -9.10922789375534)
545(-2, 3):( -4.18962569096881, 9.10922789375534)
546(-2,-3):( -4.18962569096881, -9.10922789375534)
547( 2,-3):( -4.18962569096881, 9.10922789375534)
548
549&tan
8c03c583 550(-2.0,0):( 2.18503986326152, 0 )
551(-1.0,0):( -1.55740772465490, 0 )
552(-0.5,0):( -0.54630248984379, 0 )
553( 0.0,0):( 0 , 0 )
554( 0.5,0):( 0.54630248984379, 0 )
555( 1.0,0):( 1.55740772465490, 0 )
556( 2.0,0):( -2.18503986326152, 0 )
557
558&tan
0c721ce2 559( 2, 3):( -0.00376402564150, 1.00323862735361)
560(-2, 3):( 0.00376402564150, 1.00323862735361)
561(-2,-3):( 0.00376402564150, -1.00323862735361)
562( 2,-3):( -0.00376402564150, -1.00323862735361)
563
564&sec
8c03c583 565(-2.0,0):( -2.40299796172238, 0 )
566(-1.0,0):( 1.85081571768093, 0 )
567(-0.5,0):( 1.13949392732455, 0 )
568( 0.0,0):( 1 , 0 )
569( 0.5,0):( 1.13949392732455, 0 )
570( 1.0,0):( 1.85081571768093, 0 )
571( 2.0,0):( -2.40299796172238, 0 )
572
573&sec
0c721ce2 574( 2, 3):( -0.04167496441114, 0.09061113719624)
575(-2, 3):( -0.04167496441114, -0.09061113719624)
576(-2,-3):( -0.04167496441114, 0.09061113719624)
577( 2,-3):( -0.04167496441114, -0.09061113719624)
578
579&csc
8c03c583 580(-2.0,0):( -1.09975017029462, 0 )
581(-1.0,0):( -1.18839510577812, 0 )
582(-0.5,0):( -2.08582964293349, 0 )
583( 0.5,0):( 2.08582964293349, 0 )
584( 1.0,0):( 1.18839510577812, 0 )
585( 2.0,0):( 1.09975017029462, 0 )
586
587&csc
0c721ce2 588( 2, 3):( 0.09047320975321, 0.04120098628857)
589(-2, 3):( -0.09047320975321, 0.04120098628857)
590(-2,-3):( -0.09047320975321, -0.04120098628857)
591( 2,-3):( 0.09047320975321, -0.04120098628857)
592
593&cot
8c03c583 594(-2.0,0):( 0.45765755436029, 0 )
595(-1.0,0):( -0.64209261593433, 0 )
596(-0.5,0):( -1.83048772171245, 0 )
597( 0.5,0):( 1.83048772171245, 0 )
598( 1.0,0):( 0.64209261593433, 0 )
599( 2.0,0):( -0.45765755436029, 0 )
600
601&cot
0c721ce2 602( 2, 3):( -0.00373971037634, -0.99675779656936)
603(-2, 3):( 0.00373971037634, -0.99675779656936)
604(-2,-3):( 0.00373971037634, 0.99675779656936)
605( 2,-3):( -0.00373971037634, 0.99675779656936)
606
607&asin
8c03c583 608(-2.0,0):( -1.57079632679490, 1.31695789692482)
609(-1.0,0):( -1.57079632679490, 0 )
610(-0.5,0):( -0.52359877559830, 0 )
611( 0.0,0):( 0 , 0 )
612( 0.5,0):( 0.52359877559830, 0 )
613( 1.0,0):( 1.57079632679490, 0 )
614( 2.0,0):( 1.57079632679490, -1.31695789692482)
615
616&asin
0c721ce2 617( 2, 3):( 0.57065278432110, 1.98338702991654)
618(-2, 3):( -0.57065278432110, 1.98338702991654)
619(-2,-3):( -0.57065278432110, -1.98338702991654)
620( 2,-3):( 0.57065278432110, -1.98338702991654)
621
622&acos
8c03c583 623(-2.0,0):( 3.14159265358979, -1.31695789692482)
624(-1.0,0):( 3.14159265358979, 0 )
625(-0.5,0):( 2.09439510239320, 0 )
626( 0.0,0):( 1.57079632679490, 0 )
627( 0.5,0):( 1.04719755119660, 0 )
628( 1.0,0):( 0 , 0 )
629( 2.0,0):( 0 , 1.31695789692482)
630
631&acos
0c721ce2 632( 2, 3):( 1.00014354247380, -1.98338702991654)
633(-2, 3):( 2.14144911111600, -1.98338702991654)
634(-2,-3):( 2.14144911111600, 1.98338702991654)
635( 2,-3):( 1.00014354247380, 1.98338702991654)
636
637&atan
8c03c583 638(-2.0,0):( -1.10714871779409, 0 )
639(-1.0,0):( -0.78539816339745, 0 )
640(-0.5,0):( -0.46364760900081, 0 )
641( 0.0,0):( 0 , 0 )
642( 0.5,0):( 0.46364760900081, 0 )
643( 1.0,0):( 0.78539816339745, 0 )
644( 2.0,0):( 1.10714871779409, 0 )
645
646&atan
0c721ce2 647( 2, 3):( 1.40992104959658, 0.22907268296854)
648(-2, 3):( -1.40992104959658, 0.22907268296854)
649(-2,-3):( -1.40992104959658, -0.22907268296854)
650( 2,-3):( 1.40992104959658, -0.22907268296854)
651
652&asec
8c03c583 653(-2.0,0):( 2.09439510239320, 0 )
654(-1.0,0):( 3.14159265358979, 0 )
655(-0.5,0):( 3.14159265358979, -1.31695789692482)
656( 0.5,0):( 0 , 1.31695789692482)
657( 1.0,0):( 0 , 0 )
658( 2.0,0):( 1.04719755119660, 0 )
659
660&asec
0c721ce2 661( 2, 3):( 1.42041072246703, 0.23133469857397)
662(-2, 3):( 1.72118193112276, 0.23133469857397)
663(-2,-3):( 1.72118193112276, -0.23133469857397)
664( 2,-3):( 1.42041072246703, -0.23133469857397)
665
666&acsc
8c03c583 667(-2.0,0):( -0.52359877559830, 0 )
668(-1.0,0):( -1.57079632679490, 0 )
669(-0.5,0):( -1.57079632679490, 1.31695789692482)
670( 0.5,0):( 1.57079632679490, -1.31695789692482)
671( 1.0,0):( 1.57079632679490, 0 )
672( 2.0,0):( 0.52359877559830, 0 )
673
674&acsc
0c721ce2 675( 2, 3):( 0.15038560432786, -0.23133469857397)
676(-2, 3):( -0.15038560432786, -0.23133469857397)
677(-2,-3):( -0.15038560432786, 0.23133469857397)
678( 2,-3):( 0.15038560432786, 0.23133469857397)
679
680&acot
8c03c583 681(-2.0,0):( -0.46364760900081, 0 )
682(-1.0,0):( -0.78539816339745, 0 )
683(-0.5,0):( -1.10714871779409, 0 )
684( 0.5,0):( 1.10714871779409, 0 )
685( 1.0,0):( 0.78539816339745, 0 )
686( 2.0,0):( 0.46364760900081, 0 )
687
688&acot
0c721ce2 689( 2, 3):( 0.16087527719832, -0.22907268296854)
690(-2, 3):( -0.16087527719832, -0.22907268296854)
691(-2,-3):( -0.16087527719832, 0.22907268296854)
692( 2,-3):( 0.16087527719832, 0.22907268296854)
693
694&sinh
8c03c583 695(-2.0,0):( -3.62686040784702, 0 )
696(-1.0,0):( -1.17520119364380, 0 )
697(-0.5,0):( -0.52109530549375, 0 )
698( 0.0,0):( 0 , 0 )
699( 0.5,0):( 0.52109530549375, 0 )
700( 1.0,0):( 1.17520119364380, 0 )
701( 2.0,0):( 3.62686040784702, 0 )
702
703&sinh
0c721ce2 704( 2, 3):( -3.59056458998578, 0.53092108624852)
705(-2, 3):( 3.59056458998578, 0.53092108624852)
706(-2,-3):( 3.59056458998578, -0.53092108624852)
707( 2,-3):( -3.59056458998578, -0.53092108624852)
708
709&cosh
8c03c583 710(-2.0,0):( 3.76219569108363, 0 )
711(-1.0,0):( 1.54308063481524, 0 )
712(-0.5,0):( 1.12762596520638, 0 )
713( 0.0,0):( 1 , 0 )
714( 0.5,0):( 1.12762596520638, 0 )
715( 1.0,0):( 1.54308063481524, 0 )
716( 2.0,0):( 3.76219569108363, 0 )
717
718&cosh
0c721ce2 719( 2, 3):( -3.72454550491532, 0.51182256998738)
720(-2, 3):( -3.72454550491532, -0.51182256998738)
721(-2,-3):( -3.72454550491532, 0.51182256998738)
722( 2,-3):( -3.72454550491532, -0.51182256998738)
723
724&tanh
8c03c583 725(-2.0,0):( -0.96402758007582, 0 )
726(-1.0,0):( -0.76159415595576, 0 )
727(-0.5,0):( -0.46211715726001, 0 )
728( 0.0,0):( 0 , 0 )
729( 0.5,0):( 0.46211715726001, 0 )
730( 1.0,0):( 0.76159415595576, 0 )
731( 2.0,0):( 0.96402758007582, 0 )
732
733&tanh
0c721ce2 734( 2, 3):( 0.96538587902213, -0.00988437503832)
735(-2, 3):( -0.96538587902213, -0.00988437503832)
736(-2,-3):( -0.96538587902213, 0.00988437503832)
737( 2,-3):( 0.96538587902213, 0.00988437503832)
738
739&sech
8c03c583 740(-2.0,0):( 0.26580222883408, 0 )
741(-1.0,0):( 0.64805427366389, 0 )
742(-0.5,0):( 0.88681888397007, 0 )
743( 0.0,0):( 1 , 0 )
744( 0.5,0):( 0.88681888397007, 0 )
745( 1.0,0):( 0.64805427366389, 0 )
746( 2.0,0):( 0.26580222883408, 0 )
747
748&sech
0c721ce2 749( 2, 3):( -0.26351297515839, -0.03621163655877)
750(-2, 3):( -0.26351297515839, 0.03621163655877)
751(-2,-3):( -0.26351297515839, -0.03621163655877)
752( 2,-3):( -0.26351297515839, 0.03621163655877)
753
754&csch
8c03c583 755(-2.0,0):( -0.27572056477178, 0 )
756(-1.0,0):( -0.85091812823932, 0 )
757(-0.5,0):( -1.91903475133494, 0 )
758( 0.5,0):( 1.91903475133494, 0 )
759( 1.0,0):( 0.85091812823932, 0 )
760( 2.0,0):( 0.27572056477178, 0 )
761
762&csch
0c721ce2 763( 2, 3):( -0.27254866146294, -0.04030057885689)
764(-2, 3):( 0.27254866146294, -0.04030057885689)
765(-2,-3):( 0.27254866146294, 0.04030057885689)
766( 2,-3):( -0.27254866146294, 0.04030057885689)
767
768&coth
8c03c583 769(-2.0,0):( -1.03731472072755, 0 )
770(-1.0,0):( -1.31303528549933, 0 )
771(-0.5,0):( -2.16395341373865, 0 )
772( 0.5,0):( 2.16395341373865, 0 )
773( 1.0,0):( 1.31303528549933, 0 )
774( 2.0,0):( 1.03731472072755, 0 )
775
776&coth
0c721ce2 777( 2, 3):( 1.03574663776500, 0.01060478347034)
778(-2, 3):( -1.03574663776500, 0.01060478347034)
779(-2,-3):( -1.03574663776500, -0.01060478347034)
780( 2,-3):( 1.03574663776500, -0.01060478347034)
781
782&asinh
8c03c583 783(-2.0,0):( -1.44363547517881, 0 )
784(-1.0,0):( -0.88137358701954, 0 )
785(-0.5,0):( -0.48121182505960, 0 )
786( 0.0,0):( 0 , 0 )
787( 0.5,0):( 0.48121182505960, 0 )
788( 1.0,0):( 0.88137358701954, 0 )
789( 2.0,0):( 1.44363547517881, 0 )
790
791&asinh
0c721ce2 792( 2, 3):( 1.96863792579310, 0.96465850440760)
793(-2, 3):( -1.96863792579310, 0.96465850440761)
794(-2,-3):( -1.96863792579310, -0.96465850440761)
795( 2,-3):( 1.96863792579310, -0.96465850440760)
796
797&acosh
8c03c583 798(-2.0,0):( -1.31695789692482, 3.14159265358979)
799(-1.0,0):( 0, 3.14159265358979)
800(-0.5,0):( 0, 2.09439510239320)
801( 0.0,0):( 0, 1.57079632679490)
802( 0.5,0):( 0, 1.04719755119660)
803( 1.0,0):( 0 , 0 )
804( 2.0,0):( 1.31695789692482, 0 )
805
806&acosh
0c721ce2 807( 2, 3):( 1.98338702991654, 1.00014354247380)
808(-2, 3):( -1.98338702991653, -2.14144911111600)
809(-2,-3):( -1.98338702991653, 2.14144911111600)
810( 2,-3):( 1.98338702991654, -1.00014354247380)
811
812&atanh
8c03c583 813(-2.0,0):( -0.54930614433405, 1.57079632679490)
814(-0.5,0):( -0.54930614433405, 0 )
815( 0.0,0):( 0 , 0 )
816( 0.5,0):( 0.54930614433405, 0 )
817( 2.0,0):( 0.54930614433405, 1.57079632679490)
818
819&atanh
0c721ce2 820( 2, 3):( 0.14694666622553, 1.33897252229449)
821(-2, 3):( -0.14694666622553, 1.33897252229449)
822(-2,-3):( -0.14694666622553, -1.33897252229449)
823( 2,-3):( 0.14694666622553, -1.33897252229449)
824
825&asech
8c03c583 826(-2.0,0):( 0 , 2.09439510239320)
827(-1.0,0):( 0 , 3.14159265358979)
828(-0.5,0):( -1.31695789692482, 3.14159265358979)
829( 0.5,0):( 1.31695789692482, 0 )
830( 1.0,0):( 0 , 0 )
831( 2.0,0):( 0 , 1.04719755119660)
832
833&asech
0c721ce2 834( 2, 3):( 0.23133469857397, -1.42041072246703)
835(-2, 3):( -0.23133469857397, 1.72118193112276)
836(-2,-3):( -0.23133469857397, -1.72118193112276)
837( 2,-3):( 0.23133469857397, 1.42041072246703)
838
839&acsch
8c03c583 840(-2.0,0):( -0.48121182505960, 0 )
841(-1.0,0):( -0.88137358701954, 0 )
842(-0.5,0):( -1.44363547517881, 0 )
843( 0.5,0):( 1.44363547517881, 0 )
844( 1.0,0):( 0.88137358701954, 0 )
845( 2.0,0):( 0.48121182505960, 0 )
846
847&acsch
0c721ce2 848( 2, 3):( 0.15735549884499, -0.22996290237721)
849(-2, 3):( -0.15735549884499, -0.22996290237721)
850(-2,-3):( -0.15735549884499, 0.22996290237721)
851( 2,-3):( 0.15735549884499, 0.22996290237721)
852
853&acoth
8c03c583 854(-2.0,0):( -0.54930614433405, 0 )
855(-0.5,0):( -0.54930614433405, 1.57079632679490)
856( 0.5,0):( 0.54930614433405, 1.57079632679490)
857( 2.0,0):( 0.54930614433405, 0 )
858
859&acoth
0c721ce2 860( 2, 3):( 0.14694666622553, -0.23182380450040)
861(-2, 3):( -0.14694666622553, -0.23182380450040)
862(-2,-3):( -0.14694666622553, 0.23182380450040)
863( 2,-3):( 0.14694666622553, 0.23182380450040)
864
865# eof