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