3 # $RCSfile: complex.t,v $
5 # Regression tests for the Math::Complex pacakge
6 # -- Raphael Manfredi September 1996
7 # -- Jarkko Hietaniemi March-October 1997
8 # -- Daniel S. Lewart September-October 1997
12 # $Id: complex.t,v 1.1 1997/10/15 10:02:15 jhi Exp jhi $
21 my ($args, $op, $target, $test, $test_set, $try, $val, $zvalue, @set, @val);
26 'my ($res, $s0,$s1,$s2,$s3,$s4,$s5,$s6,$s7,$s8,$s9,$s10, $z0,$z1,$z2);' .
33 next if $_ eq '' || /^\#/;
35 $test_set = 0; # Assume not a test over a set of values
41 set($1, \@set, \@val);
45 $test_set = 1; # Requests we loop over the set...
47 my @args = split(/:/);
50 for ($i = 0; $i < @set; $i++) {
53 # textual value as found in set definition
55 test($zvalue, $target, @args);
58 test($op, undef, @args);
68 # push(@script, qq(print "# '$op'\n";));
69 push(@script, qq(eval '$op';));
70 push(@script, qq(print 'not ' unless (\$@ =~ /Division by zero/);));
71 push(@script, qq( print "ok $test\\n";\n));
81 # push(@script, qq(print "# '$op'\n";));
82 push(@script, qq(eval '$op';));
83 push(@script, qq(print 'not ' unless (\$@ =~ /Logarithm of zero/);));
84 push(@script, qq( print "ok $test\\n";\n));
88 my $minusi = cplx(0, -1);
92 # 'tan(pi/2)', # may succeed thanks to floating point inaccuracies
93 # 'sec(pi/2)', # may succeed thanks to floating point inaccuracies
102 # 'tanh(pi/2)', # may succeed thanks to floating point inaccuracies
103 # 'sech(pi/2)', # may succeed thanks to floating point inaccuracies
112 my $zero = cplx(0, 0);
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/);));
128 push(@script, qq( print "ok $test\\n";\n));
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/);));
142 push(@script, qq( print "ok $test\\n";\n));
146 test_broot(qw(-3 -2.1 0 0.99));
149 eval join '', @script;
155 push(@script, qq(print "# $op=\n";));
159 my ($op, $z, @args) = @_;
163 $baop = 1 if ($op =~ s/;=$//);
164 for ($i = 0; $i < @args; $i++) {
165 $val = value($args[$i]);
166 push @script, "\$z$i = $val;\n";
169 $args = "'$op'"; # Really the value
170 $try = "abs(\$z0 - \$z1) <= $eps ? \$z1 : \$z0";
171 push @script, "\$res = $try; ";
172 push @script, "check($test, $args[0], \$res, \$z$#args, $args);\n";
177 $args = "'$args[0]'";
179 $try = ($op =~ /^\w/) ? "$op(\$z0, \$z1)" : "\$z0 $op \$z1";
180 $args = "'$args[0]', '$args[1]'";
182 push @script, "\$res = $try; ";
183 push @script, "check($test, '$try', \$res, \$z$#args, $args);\n";
184 if (@args > 2 and $baop) { # binary assignment ops
186 # check the op= works
189 my \$za = cplx(ref \$z0 ? \@{\$z0->cartesian} : (\$z0, 0));
191 my (\$z1r, \$z1i) = ref \$z1 ? \@{\$z1->cartesian} : (\$z1, 0);
193 my \$zb = cplx(\$z1r, \$z1i);
196 my (\$zbr, \$zbi) = \@{\$zb->cartesian};
198 check($test, '\$z0 $op= \$z1', \$za, \$z$#args, $args);
201 # check that the rhs has not changed
202 push @script, qq(print "not " unless (\$zbr == \$z1r and \$zbi == \$z1i););
203 push @script, qq( print "ok $test\\n";\n);
210 my ($set, $setref, $valref) = @_;
213 my @set = split(/;\s*/, $set);
216 for ($i = 0; $i < @set; $i++) {
217 push(@{$valref}, $set[$i]);
218 my $val = value($set[$i]);
219 push @script, "\$s$i = $val;\n";
220 push @{$setref}, "\$s$i";
226 if (/^\s*\((.*),(.*)\)/) {
227 return "cplx($1,$2)";
229 elsif (/^\s*\[(.*),(.*)\]/) {
230 return "cplxe($1,$2)";
232 elsif (/^\s*'(.*)'/) {
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;
241 elsif (/^\s*"(.*)"/) {
248 my ($test, $try, $got, $expected, @z) = @_;
252 if ("$got" eq "$expected"
254 ($expected =~ /^-?\d/ && $got == $expected)
256 (abs($got - $expected) < $eps)
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";
268 return ($z1 + i*$z2) * ($z1 - i*$z2);
273 return ($z1 + $z2) * ($z1 - $z2);
303 [2,2*pi/3]:(1,0):[2,2*pi/3]
315 [4,pi]:[2,pi/2]:[2,pi/2]
316 [2,pi/2]:[4,pi]:[0.5,-(pi)/2]
321 (2,3):(4,0):(-119,-120)
382 [6, -2*pi/3]:"[6,-2pi/3]"
383 [0.5, -9*pi/11]:"[0.5,-9pi/11]"
385 { (4,3); [3,2]; (-3,4); (0,2); [2,1] }
388 |'z - ~z':'2*i*Im(z)'
389 |'z * ~z':'abs(z) * abs(z)'
391 { (0.5, 0); (-0.5, 0); (2,3); [3,2]; (-3,2); (0,2); 3; 1.2; (-3, 0); (-2, -1); [2,1] }
393 |'(root(z, 4))[1] ** 4':'z'
394 |'(root(z, 5))[3] ** 5':'z'
395 |'(root(z, 8))[7] ** 8':'z'
397 |'acot(z)':'acotan(z)'
398 |'acsc(z)':'acosec(z)'
399 |'acsc(z)':'asin(1 / z)'
400 |'asec(z)':'acos(1 / z)'
401 |'cbrt(z)':'cbrt(r) * exp(i * t/3)'
403 |'addsq(cos(z), sin(z))':1
404 |'cos(z)':'cosh(i*z)'
405 |'subsq(cosh(z), sinh(z))':1
407 |'cot(z)':'1 / tan(z)'
410 |'csc(z)':'1 / sin(z)'
413 |'exp(z)':'exp(a) * exp(i * b)'
416 |'log(z)':'log(r) + i*t'
417 |'log10(z)':'log(z) / log(10)'
418 |'logn(z, 2)':'log(z) / log(2)'
419 |'logn(z, 3)':'log(z) / log(3)'
421 |'sec(z)':'1 / cos(z)'
423 |'sin(i * z)':'i * sinh(z)'
424 |'sqrt(z) * sqrt(z)':'z'
425 |'sqrt(z)':'sqrt(r) * exp(i * t/2)'
427 |'z**z':'exp(z * log(z))'
429 { (1,1); [1,0.5]; (-2, -1); 2; -3; (-1,0.5); (0,0.5); 0.5; (2, 0); (-1, -2) }
431 |'cosh(acosh(z))':'z'
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'
441 |'tanh(atanh(z))':'z'
443 { (0.2,-0.4); [1,0.5]; -1.2; (-1,0.5); 0.5; (1.1, 0) }
445 |'acos(cos(z)) ** 2':'z * z'
446 |'acosh(cosh(z)) ** 2':'z * z'
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)'
453 |'asinh(sinh(z))':'z'
455 |'atanh(tanh(z))':'z'
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 )
463 ( 2.0,0):( 0.69314718055995, 0 )
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)
472 (-2.0,0):( -0.90929742682568, 0 )
473 (-1.0,0):( -0.84147098480790, 0 )
474 (-0.5,0):( -0.47942553860420, 0 )
476 ( 0.5,0):( 0.47942553860420, 0 )
477 ( 1.0,0):( 0.84147098480790, 0 )
478 ( 2.0,0):( 0.90929742682568, 0 )
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)
487 (-2.0,0):( -0.41614683654714, 0 )
488 (-1.0,0):( 0.54030230586814, 0 )
489 (-0.5,0):( 0.87758256189037, 0 )
491 ( 0.5,0):( 0.87758256189037, 0 )
492 ( 1.0,0):( 0.54030230586814, 0 )
493 ( 2.0,0):( -0.41614683654714, 0 )
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)
502 (-2.0,0):( 2.18503986326152, 0 )
503 (-1.0,0):( -1.55740772465490, 0 )
504 (-0.5,0):( -0.54630248984379, 0 )
506 ( 0.5,0):( 0.54630248984379, 0 )
507 ( 1.0,0):( 1.55740772465490, 0 )
508 ( 2.0,0):( -2.18503986326152, 0 )
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)
517 (-2.0,0):( -2.40299796172238, 0 )
518 (-1.0,0):( 1.85081571768093, 0 )
519 (-0.5,0):( 1.13949392732455, 0 )
521 ( 0.5,0):( 1.13949392732455, 0 )
522 ( 1.0,0):( 1.85081571768093, 0 )
523 ( 2.0,0):( -2.40299796172238, 0 )
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)
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 )
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)
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 )
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)
560 (-2.0,0):( -1.57079632679490, 1.31695789692482)
561 (-1.0,0):( -1.57079632679490, 0 )
562 (-0.5,0):( -0.52359877559830, 0 )
564 ( 0.5,0):( 0.52359877559830, 0 )
565 ( 1.0,0):( 1.57079632679490, 0 )
566 ( 2.0,0):( 1.57079632679490, -1.31695789692482)
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)
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 )
581 ( 2.0,0):( 0 , 1.31695789692482)
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)
590 (-2.0,0):( -1.10714871779409, 0 )
591 (-1.0,0):( -0.78539816339745, 0 )
592 (-0.5,0):( -0.46364760900081, 0 )
594 ( 0.5,0):( 0.46364760900081, 0 )
595 ( 1.0,0):( 0.78539816339745, 0 )
596 ( 2.0,0):( 1.10714871779409, 0 )
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)
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)
610 ( 2.0,0):( 1.04719755119660, 0 )
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)
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 )
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)
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 )
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)
647 (-2.0,0):( -3.62686040784702, 0 )
648 (-1.0,0):( -1.17520119364380, 0 )
649 (-0.5,0):( -0.52109530549375, 0 )
651 ( 0.5,0):( 0.52109530549375, 0 )
652 ( 1.0,0):( 1.17520119364380, 0 )
653 ( 2.0,0):( 3.62686040784702, 0 )
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)
662 (-2.0,0):( 3.76219569108363, 0 )
663 (-1.0,0):( 1.54308063481524, 0 )
664 (-0.5,0):( 1.12762596520638, 0 )
666 ( 0.5,0):( 1.12762596520638, 0 )
667 ( 1.0,0):( 1.54308063481524, 0 )
668 ( 2.0,0):( 3.76219569108363, 0 )
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)
677 (-2.0,0):( -0.96402758007582, 0 )
678 (-1.0,0):( -0.76159415595576, 0 )
679 (-0.5,0):( -0.46211715726001, 0 )
681 ( 0.5,0):( 0.46211715726001, 0 )
682 ( 1.0,0):( 0.76159415595576, 0 )
683 ( 2.0,0):( 0.96402758007582, 0 )
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)
692 (-2.0,0):( 0.26580222883408, 0 )
693 (-1.0,0):( 0.64805427366389, 0 )
694 (-0.5,0):( 0.88681888397007, 0 )
696 ( 0.5,0):( 0.88681888397007, 0 )
697 ( 1.0,0):( 0.64805427366389, 0 )
698 ( 2.0,0):( 0.26580222883408, 0 )
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)
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 )
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)
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 )
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)
735 (-2.0,0):( -1.44363547517881, 0 )
736 (-1.0,0):( -0.88137358701954, 0 )
737 (-0.5,0):( -0.48121182505960, 0 )
739 ( 0.5,0):( 0.48121182505960, 0 )
740 ( 1.0,0):( 0.88137358701954, 0 )
741 ( 2.0,0):( 1.44363547517881, 0 )
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)
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)
756 ( 2.0,0):( 1.31695789692482, 0 )
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)
765 (-2.0,0):( -0.54930614433405, 1.57079632679490)
766 (-0.5,0):( -0.54930614433405, 0 )
768 ( 0.5,0):( 0.54930614433405, 0 )
769 ( 2.0,0):( 0.54930614433405, 1.57079632679490)
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)
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 )
783 ( 2.0,0):( 0 , 1.04719755119660)
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)
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 )
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)
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 )
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)