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