4 # Regression tests for the Math::Complex pacakge
5 # -- Raphael Manfredi since Sep 1996
6 # -- Jarkko Hietaniemi since Mar 1997
7 # -- Daniel S. Lewart since Sep 1997
9 use Math::Complex 1.54;
11 my ($args, $op, $target, $test, $test_set, $try, $val, $zvalue, @set, @val);
16 'my ($res, $s0,$s1,$s2,$s3,$s4,$s5,$s6,$s7,$s8,$s9,$s10,$z0,$z1,$z2);' .
21 if ($^O eq 'unicos') { # For some reason root() produces very inaccurate
22 $eps = 1e-10; # results in Cray UNICOS, and occasionally also
23 } # cos(), sin(), cosh(), sinh(). The division
24 # of doubles is the current suspect.
27 push @script, "{ my \$t=$test; ".q{
28 my $a = Math::Complex->new(1);
31 print "not " unless "$a" eq "3" && "$b" eq "1";
37 next if $_ eq '' || /^\#/;
39 $test_set = 0; # Assume not a test over a set of values
45 set($1, \@set, \@val);
49 $test_set = 1; # Requests we loop over the set...
51 my @args = split(/:/);
54 for ($i = 0; $i < @set; $i++) {
57 # textual value as found in set definition
59 test($zvalue, $target, @args);
62 test($op, undef, @args);
72 push(@script, <<'EOT');
77 print "# $test Re(z) = ",$z->Re(), " Im(z) = ", $z->Im(), " z = $z\n";
78 print 'not ' unless Re($z) == 2 and Im($z) == 3;
80 push(@script, qq(print "ok $test\\n"}\n));
83 push(@script, <<'EOT');
87 print "# $test Re(z) = ",$z->Re(), " Im(z) = ", $z->Im(), " z = $z\n";
88 print 'not ' unless (abs($z) - 3 * sqrt(2)) < $eps and
89 (arg($z) - pi / 4 ) < $eps and
90 (Re($z) - 3 ) < $eps and
93 push(@script, qq(print "ok $test\\n"}\n));
96 push(@script, <<'EOT');
100 print "# $test Re(z) = ",$z->Re(), " Im(z) = ", $z->Im(), " z = $z\n";
101 print 'not ' unless (arg($z) + 3 / 4 * pi) < $eps and
102 (abs($z) - sqrt(2) ) < $eps and
103 (Re($z) + 1 ) < $eps and
104 (Im($z) + 1 ) < $eps;
106 push(@script, qq(print "ok $test\\n"}\n));
113 my $pi = cplx(pi, 0);
114 my $pii = cplx(0, pi);
115 my $pip2 = cplx(pi/2, 0);
116 my $pip4 = cplx(pi/4, 0);
117 my $zero = cplx(0, 0);
121 push(@script, $constants);
124 # test the divbyzeros
129 push(@script, <<EOT);
131 (\$bad) = (\$@ =~ /(.+)/);
132 print "# $test op = $op divbyzero? \$bad...\n";
133 print 'not ' unless (\$@ =~ /Division by zero/);
135 push(@script, qq(print "ok $test\\n";\n));
139 # test the logofzeros
144 push(@script, <<EOT);
146 (\$bad) = (\$@ =~ /(.+)/);
147 print "# $test op = $op logofzero? \$bad...\n";
148 print 'not ' unless (\$@ =~ /Logarithm of zero/);
150 push(@script, qq(print "ok $test\\n";\n));
158 # 'acoth(-1)', # Log of zero.
166 # 'atanh(-1)', # Log of zero.
172 'atan(cplx(0, 1), cplx(1, 0))',
188 push(@script, <<EOT);
190 (\$bad) = (\$@ =~ /(.+)/);
191 print "# $test op = $op badroot? \$bad...\n";
192 print 'not ' unless (\$@ =~ /root rank must be/);
194 push(@script, qq(print "ok $test\\n";\n));
198 test_broot(qw(-3 -2.1 0 0.99));
200 sub test_display_format {
203 print "# package display_format cartesian?\n";
204 print "not " unless Math::Complex->display_format eq 'cartesian';
209 my \$j = (root(1,3))[1];
211 \$j->display_format('polar');
216 print "# j display_format polar?\n";
217 print "not " unless \$j->display_format eq 'polar';
224 print "not " unless "\$j" eq "[1,2pi/3]";
229 %display_format = \$j->display_format;
234 print "# display_format{style} polar?\n";
235 print "not " unless \$display_format{style} eq 'polar';
241 print "# keys %display_format == 2?\n";
242 print "not " unless keys %display_format == 2;
245 \$j->display_format('style' => 'cartesian', 'format' => '%.5f');
251 print "not " unless "\$j" eq "-0.50000+0.86603i";
254 %display_format = \$j->display_format;
259 print "# display_format{format} %.5f?\n";
260 print "not " unless \$display_format{format} eq '%.5f';
266 print "# keys %display_format == 3?\n";
267 print "not " unless keys %display_format == 3;
270 \$j->display_format('format' => undef);
276 print "not " unless "\$j" =~ /^-0(?:\\.5(?:0000\\d+)?|\\.49999\\d+)\\+0.86602540\\d+i\$/;
279 \$j->display_format('style' => 'polar', 'polar_pretty_print' => 0);
285 print "not " unless "\$j" =~ /^\\[1,2\\.09439510\\d+\\]\$/;
288 \$j->display_format('style' => 'polar', 'format' => "%.4g");
294 print "not " unless "\$j" =~ /^\\[1,2\\.094\\]\$/;
297 \$j->display_format('style' => 'cartesian', 'format' => '(%.5g)');
303 print "not " unless "\$j" eq "(-0.5)+(0.86603)i";
309 print "# j display_format cartesian?\n";
310 print "not " unless \$j->display_format eq 'cartesian';
315 test_display_format();
320 print "# remake 2+3i\n";
322 print "not " unless \$z == Math::Complex->make(2,3);
329 \$z = Math::Complex->make('3i');
330 print "not " unless \$z == cplx(0,3);
336 print "# emake [2,3]\n";
337 \$z = Math::Complex->emake('[2,3]');
338 print "not " unless \$z == cplxe(2,3);
344 print "# make (2,3)\n";
345 \$z = Math::Complex->make('(2,3)');
346 print "not " unless \$z == cplx(2,3);
352 print "# emake [2,3pi/8]\n";
353 \$z = Math::Complex->emake('[2,3pi/8]');
354 print "not " unless \$z == cplxe(2,3*\$pi/8);
360 print "# emake [2]\n";
361 \$z = Math::Complex->emake('[2]');
362 print "not " unless \$z == cplxe(2);
368 push @script, <<'EOS';
370 print "# cplx, cplxe, make, emake without arguments\n";
376 print ((\$z0->Re() == 0) ? "ok $test\n" : "not ok $test\n");
381 print ((\$z0->Im() == 0) ? "ok $test\n" : "not ok $test\n");
387 print ((\$z1->rho() == 0) ? "ok $test\n" : "not ok $test\n");
392 print ((\$z1->theta() == 0) ? "ok $test\n" : "not ok $test\n");
397 my \$z2 = Math::Complex->make();
398 print ((\$z2->Re() == 0) ? "ok $test\n" : "not ok $test\n");
403 print ((\$z2->Im() == 0) ? "ok $test\n" : "not ok $test\n");
408 my \$z3 = Math::Complex->emake();
409 print ((\$z3->rho() == 0) ? "ok $test\n" : "not ok $test\n");
414 print ((\$z3->theta() == 0) ? "ok $test\n" : "not ok $test\n");
420 push @script, <<'EOS';
421 print "# atan2() with some real arguments\n";
423 my @real = (-1, 0, 1);
426 next if $x == 0 && $y == 0;
429 print ((Math::Complex::atan2($y, $x) == CORE::atan2($y, $x)) ? "ok $test\n" : "not ok $test\n");
433 push @script, <<'EOS';
434 print "# atan2() with some complex arguments\n";
438 print (abs(atan2(0, cplx(0, 1))) < $eps ? "ok $test\n" : "not ok $test\n");
442 print (abs(atan2(cplx(0, 1), 0) - \$pip2) < $eps ? "ok $test\n" : "not ok $test\n");
446 print (abs(atan2(cplx(0, 1), cplx(0, 1)) - \$pip4) < $eps ? "ok $test\n" : "not ok $test\n");
450 print (abs(atan2(cplx(0, 1), cplx(1, 1)) - cplx(0.553574358897045, 0.402359478108525)) < $eps ? "ok $test\n" : "not ok $test\n");
466 #print @script, "\n";
467 eval join '', @script;
473 push(@script, qq(print "# $op=\n";));
477 my ($op, $z, @args) = @_;
481 $baop = 1 if ($op =~ s/;=$//);
482 for ($i = 0; $i < @args; $i++) {
483 $val = value($args[$i]);
484 push @script, "\$z$i = $val;\n";
487 $args = "'$op'"; # Really the value
488 $try = "abs(\$z0 - \$z1) <= $eps ? \$z1 : \$z0";
489 push @script, "\$res = $try; ";
490 push @script, "check($test, $args[0], \$res, \$z$#args, $args);\n";
495 $args = "'$args[0]'";
497 $try = ($op =~ /^\w/) ? "$op(\$z0, \$z1)" : "\$z0 $op \$z1";
498 $args = "'$args[0]', '$args[1]'";
500 push @script, "\$res = $try; ";
501 push @script, "check($test, '$try', \$res, \$z$#args, $args);\n";
502 if (@args > 2 and $baop) { # binary assignment ops
504 # check the op= works
507 my \$za = cplx(ref \$z0 ? \@{\$z0->_cartesian} : (\$z0, 0));
509 my (\$z1r, \$z1i) = ref \$z1 ? \@{\$z1->_cartesian} : (\$z1, 0);
511 my \$zb = cplx(\$z1r, \$z1i);
514 my (\$zbr, \$zbi) = \@{\$zb->_cartesian};
516 check($test, '\$z0 $op= \$z1', \$za, \$z$#args, $args);
519 # check that the rhs has not changed
520 push @script, qq(print "not " unless (\$zbr == \$z1r and \$zbi == \$z1i););
521 push @script, qq(print "ok $test\\n";\n);
528 my ($set, $setref, $valref) = @_;
531 my @set = split(/;\s*/, $set);
534 for ($i = 0; $i < @set; $i++) {
535 push(@{$valref}, $set[$i]);
536 my $val = value($set[$i]);
537 push @script, "\$s$i = $val;\n";
538 push @{$setref}, "\$s$i";
544 if (/^\s*\((.*),(.*)\)/) {
545 return "cplx($1,$2)";
547 elsif (/^\s*([\-\+]?(?:\d+(\.\d+)?|\.\d+)(?:[e[\-\+]\d+])?)/) {
550 elsif (/^\s*\[(.*),(.*)\]/) {
551 return "cplxe($1,$2)";
553 elsif (/^\s*'(.*)'/) {
555 $ex =~ s/\bz\b/$target/g;
556 $ex =~ s/\br\b/abs($target)/g;
557 $ex =~ s/\bt\b/arg($target)/g;
558 $ex =~ s/\ba\b/Re($target)/g;
559 $ex =~ s/\bb\b/Im($target)/g;
562 elsif (/^\s*"(.*)"/) {
569 my ($test, $try, $got, $expected, @z) = @_;
573 if ("$got" eq "$expected"
575 ($expected =~ /^-?\d/ && $got == $expected)
577 (abs(Math::Complex->make($got) - Math::Complex->make($expected)) < $eps)
579 (abs($got - $expected) < $eps)
583 print "not ok $test\n";
584 my $args = (@z == 1) ? "z = $z[0]" : "z0 = $z[0], z1 = $z[1]";
585 print "# '$try' expected: '$expected' got: '$got' for $args\n";
591 return ($z1 + i*$z2) * ($z1 - i*$z2);
596 return ($z1 + $z2) * ($z1 - $z2);
626 [2,2*pi/3]:(1,0):[2,2*pi/3]
638 [4,pi]:[2,pi/2]:[2,pi/2]
639 [2,pi/2]:[4,pi]:[0.5,-(pi)/2]
644 (2,3):(4,0):(-119,-120)
694 &_stringify_cartesian
706 [6, -2*pi/3]:"[6,-2pi/3]"
707 [0.5, -9*pi/11]:"[0.5,-9pi/11]"
710 { (4,3); [3,2]; (-3,4); (0,2); [2,1] }
713 |'z - ~z':'2*i*Im(z)'
714 |'z * ~z':'abs(z) * abs(z)'
716 { (0.5, 0); (-0.5, 0); (2,3); [3,2]; (-3,2); (0,2); 3; 1.2; (-3, 0); (-2, -1); [2,1] }
718 |'(root(z, 4))[1] ** 4':'z'
719 |'(root(z, 5))[3] ** 5':'z'
720 |'(root(z, 8))[7] ** 8':'z'
721 |'(root(z, 8, 0)) ** 8':'z'
722 |'(root(z, 8, 7)) ** 8':'z'
724 |'acot(z)':'acotan(z)'
725 |'acsc(z)':'acosec(z)'
726 |'acsc(z)':'asin(1 / z)'
727 |'asec(z)':'acos(1 / z)'
728 |'cbrt(z)':'cbrt(r) * exp(i * t/3)'
730 |'addsq(cos(z), sin(z))':1
731 |'cos(z)':'cosh(i*z)'
732 |'subsq(cosh(z), sinh(z))':1
734 |'cot(z)':'1 / tan(z)'
737 |'csc(z)':'1 / sin(z)'
740 |'exp(z)':'exp(a) * exp(i * b)'
743 |'log(z)':'log(r) + i*t'
744 |'log10(z)':'log(z) / log(10)'
745 |'logn(z, 2)':'log(z) / log(2)'
746 |'logn(z, 3)':'log(z) / log(3)'
748 |'sec(z)':'1 / cos(z)'
750 |'sin(i * z)':'i * sinh(z)'
751 |'sqrt(z) * sqrt(z)':'z'
752 |'sqrt(z)':'sqrt(r) * exp(i * t/2)'
754 |'z**z':'exp(z * log(z))'
756 { (1,1); [1,0.5]; (-2, -1); 2; -3; (-1,0.5); (0,0.5); 0.5; (2, 0); (-1, -2) }
758 |'cosh(acosh(z))':'z'
759 |'coth(acoth(z))':'z'
760 |'coth(z)':'1 / tanh(z)'
761 |'coth(z)':'cotanh(z)'
762 |'csch(acsch(z))':'z'
763 |'csch(z)':'1 / sinh(z)'
764 |'csch(z)':'cosech(z)'
765 |'sech(asech(z))':'z'
766 |'sech(z)':'1 / cosh(z)'
767 |'sinh(asinh(z))':'z'
768 |'tanh(atanh(z))':'z'
770 { (0.2,-0.4); [1,0.5]; -1.2; (-1,0.5); 0.5; (1.1, 0) }
772 |'acos(cos(z)) ** 2':'z * z'
773 |'acosh(cosh(z)) ** 2':'z * z'
774 |'acoth(z)':'acotanh(z)'
775 |'acoth(z)':'atanh(1 / z)'
776 |'acsch(z)':'acosech(z)'
777 |'acsch(z)':'asinh(1 / z)'
778 |'asech(z)':'acosh(1 / z)'
780 |'asinh(sinh(z))':'z'
782 |'atanh(tanh(z))':'z'
785 (-2.0,0):( 0.69314718055995, 3.14159265358979)
786 (-1.0,0):( 0 , 3.14159265358979)
787 (-0.5,0):( -0.69314718055995, 3.14159265358979)
788 ( 0.5,0):( -0.69314718055995, 0 )
790 ( 2.0,0):( 0.69314718055995, 0 )
793 ( 2, 3):( 1.28247467873077, 0.98279372324733)
794 (-2, 3):( 1.28247467873077, 2.15879893034246)
795 (-2,-3):( 1.28247467873077, -2.15879893034246)
796 ( 2,-3):( 1.28247467873077, -0.98279372324733)
799 (-2.0,0):( -0.90929742682568, 0 )
800 (-1.0,0):( -0.84147098480790, 0 )
801 (-0.5,0):( -0.47942553860420, 0 )
803 ( 0.5,0):( 0.47942553860420, 0 )
804 ( 1.0,0):( 0.84147098480790, 0 )
805 ( 2.0,0):( 0.90929742682568, 0 )
808 ( 2, 3):( 9.15449914691143, -4.16890695996656)
809 (-2, 3):( -9.15449914691143, -4.16890695996656)
810 (-2,-3):( -9.15449914691143, 4.16890695996656)
811 ( 2,-3):( 9.15449914691143, 4.16890695996656)
814 (-2.0,0):( -0.41614683654714, 0 )
815 (-1.0,0):( 0.54030230586814, 0 )
816 (-0.5,0):( 0.87758256189037, 0 )
818 ( 0.5,0):( 0.87758256189037, 0 )
819 ( 1.0,0):( 0.54030230586814, 0 )
820 ( 2.0,0):( -0.41614683654714, 0 )
823 ( 2, 3):( -4.18962569096881, -9.10922789375534)
824 (-2, 3):( -4.18962569096881, 9.10922789375534)
825 (-2,-3):( -4.18962569096881, -9.10922789375534)
826 ( 2,-3):( -4.18962569096881, 9.10922789375534)
829 (-2.0,0):( 2.18503986326152, 0 )
830 (-1.0,0):( -1.55740772465490, 0 )
831 (-0.5,0):( -0.54630248984379, 0 )
833 ( 0.5,0):( 0.54630248984379, 0 )
834 ( 1.0,0):( 1.55740772465490, 0 )
835 ( 2.0,0):( -2.18503986326152, 0 )
838 ( 2, 3):( -0.00376402564150, 1.00323862735361)
839 (-2, 3):( 0.00376402564150, 1.00323862735361)
840 (-2,-3):( 0.00376402564150, -1.00323862735361)
841 ( 2,-3):( -0.00376402564150, -1.00323862735361)
844 (-2.0,0):( -2.40299796172238, 0 )
845 (-1.0,0):( 1.85081571768093, 0 )
846 (-0.5,0):( 1.13949392732455, 0 )
848 ( 0.5,0):( 1.13949392732455, 0 )
849 ( 1.0,0):( 1.85081571768093, 0 )
850 ( 2.0,0):( -2.40299796172238, 0 )
853 ( 2, 3):( -0.04167496441114, 0.09061113719624)
854 (-2, 3):( -0.04167496441114, -0.09061113719624)
855 (-2,-3):( -0.04167496441114, 0.09061113719624)
856 ( 2,-3):( -0.04167496441114, -0.09061113719624)
859 (-2.0,0):( -1.09975017029462, 0 )
860 (-1.0,0):( -1.18839510577812, 0 )
861 (-0.5,0):( -2.08582964293349, 0 )
862 ( 0.5,0):( 2.08582964293349, 0 )
863 ( 1.0,0):( 1.18839510577812, 0 )
864 ( 2.0,0):( 1.09975017029462, 0 )
867 ( 2, 3):( 0.09047320975321, 0.04120098628857)
868 (-2, 3):( -0.09047320975321, 0.04120098628857)
869 (-2,-3):( -0.09047320975321, -0.04120098628857)
870 ( 2,-3):( 0.09047320975321, -0.04120098628857)
873 (-2.0,0):( 0.45765755436029, 0 )
874 (-1.0,0):( -0.64209261593433, 0 )
875 (-0.5,0):( -1.83048772171245, 0 )
876 ( 0.5,0):( 1.83048772171245, 0 )
877 ( 1.0,0):( 0.64209261593433, 0 )
878 ( 2.0,0):( -0.45765755436029, 0 )
881 ( 2, 3):( -0.00373971037634, -0.99675779656936)
882 (-2, 3):( 0.00373971037634, -0.99675779656936)
883 (-2,-3):( 0.00373971037634, 0.99675779656936)
884 ( 2,-3):( -0.00373971037634, 0.99675779656936)
887 (-2.0,0):( -1.57079632679490, 1.31695789692482)
888 (-1.0,0):( -1.57079632679490, 0 )
889 (-0.5,0):( -0.52359877559830, 0 )
891 ( 0.5,0):( 0.52359877559830, 0 )
892 ( 1.0,0):( 1.57079632679490, 0 )
893 ( 2.0,0):( 1.57079632679490, -1.31695789692482)
896 ( 2, 3):( 0.57065278432110, 1.98338702991654)
897 (-2, 3):( -0.57065278432110, 1.98338702991654)
898 (-2,-3):( -0.57065278432110, -1.98338702991654)
899 ( 2,-3):( 0.57065278432110, -1.98338702991654)
902 (-2.0,0):( 3.14159265358979, -1.31695789692482)
903 (-1.0,0):( 3.14159265358979, 0 )
904 (-0.5,0):( 2.09439510239320, 0 )
905 ( 0.0,0):( 1.57079632679490, 0 )
906 ( 0.5,0):( 1.04719755119660, 0 )
908 ( 2.0,0):( 0 , 1.31695789692482)
911 ( 2, 3):( 1.00014354247380, -1.98338702991654)
912 (-2, 3):( 2.14144911111600, -1.98338702991654)
913 (-2,-3):( 2.14144911111600, 1.98338702991654)
914 ( 2,-3):( 1.00014354247380, 1.98338702991654)
917 (-2.0,0):( -1.10714871779409, 0 )
918 (-1.0,0):( -0.78539816339745, 0 )
919 (-0.5,0):( -0.46364760900081, 0 )
921 ( 0.5,0):( 0.46364760900081, 0 )
922 ( 1.0,0):( 0.78539816339745, 0 )
923 ( 2.0,0):( 1.10714871779409, 0 )
926 ( 2, 3):( 1.40992104959658, 0.22907268296854)
927 (-2, 3):( -1.40992104959658, 0.22907268296854)
928 (-2,-3):( -1.40992104959658, -0.22907268296854)
929 ( 2,-3):( 1.40992104959658, -0.22907268296854)
932 (-2.0,0):( 2.09439510239320, 0 )
933 (-1.0,0):( 3.14159265358979, 0 )
934 (-0.5,0):( 3.14159265358979, -1.31695789692482)
935 ( 0.5,0):( 0 , 1.31695789692482)
937 ( 2.0,0):( 1.04719755119660, 0 )
940 ( 2, 3):( 1.42041072246703, 0.23133469857397)
941 (-2, 3):( 1.72118193112276, 0.23133469857397)
942 (-2,-3):( 1.72118193112276, -0.23133469857397)
943 ( 2,-3):( 1.42041072246703, -0.23133469857397)
946 (-2.0,0):( -0.52359877559830, 0 )
947 (-1.0,0):( -1.57079632679490, 0 )
948 (-0.5,0):( -1.57079632679490, 1.31695789692482)
949 ( 0.5,0):( 1.57079632679490, -1.31695789692482)
950 ( 1.0,0):( 1.57079632679490, 0 )
951 ( 2.0,0):( 0.52359877559830, 0 )
954 ( 2, 3):( 0.15038560432786, -0.23133469857397)
955 (-2, 3):( -0.15038560432786, -0.23133469857397)
956 (-2,-3):( -0.15038560432786, 0.23133469857397)
957 ( 2,-3):( 0.15038560432786, 0.23133469857397)
960 (-2.0,0):( -0.46364760900081, 0 )
961 (-1.0,0):( -0.78539816339745, 0 )
962 (-0.5,0):( -1.10714871779409, 0 )
963 ( 0.5,0):( 1.10714871779409, 0 )
964 ( 1.0,0):( 0.78539816339745, 0 )
965 ( 2.0,0):( 0.46364760900081, 0 )
968 ( 2, 3):( 0.16087527719832, -0.22907268296854)
969 (-2, 3):( -0.16087527719832, -0.22907268296854)
970 (-2,-3):( -0.16087527719832, 0.22907268296854)
971 ( 2,-3):( 0.16087527719832, 0.22907268296854)
974 (-2.0,0):( -3.62686040784702, 0 )
975 (-1.0,0):( -1.17520119364380, 0 )
976 (-0.5,0):( -0.52109530549375, 0 )
978 ( 0.5,0):( 0.52109530549375, 0 )
979 ( 1.0,0):( 1.17520119364380, 0 )
980 ( 2.0,0):( 3.62686040784702, 0 )
983 ( 2, 3):( -3.59056458998578, 0.53092108624852)
984 (-2, 3):( 3.59056458998578, 0.53092108624852)
985 (-2,-3):( 3.59056458998578, -0.53092108624852)
986 ( 2,-3):( -3.59056458998578, -0.53092108624852)
989 (-2.0,0):( 3.76219569108363, 0 )
990 (-1.0,0):( 1.54308063481524, 0 )
991 (-0.5,0):( 1.12762596520638, 0 )
993 ( 0.5,0):( 1.12762596520638, 0 )
994 ( 1.0,0):( 1.54308063481524, 0 )
995 ( 2.0,0):( 3.76219569108363, 0 )
998 ( 2, 3):( -3.72454550491532, 0.51182256998738)
999 (-2, 3):( -3.72454550491532, -0.51182256998738)
1000 (-2,-3):( -3.72454550491532, 0.51182256998738)
1001 ( 2,-3):( -3.72454550491532, -0.51182256998738)
1004 (-2.0,0):( -0.96402758007582, 0 )
1005 (-1.0,0):( -0.76159415595576, 0 )
1006 (-0.5,0):( -0.46211715726001, 0 )
1008 ( 0.5,0):( 0.46211715726001, 0 )
1009 ( 1.0,0):( 0.76159415595576, 0 )
1010 ( 2.0,0):( 0.96402758007582, 0 )
1013 ( 2, 3):( 0.96538587902213, -0.00988437503832)
1014 (-2, 3):( -0.96538587902213, -0.00988437503832)
1015 (-2,-3):( -0.96538587902213, 0.00988437503832)
1016 ( 2,-3):( 0.96538587902213, 0.00988437503832)
1019 (-2.0,0):( 0.26580222883408, 0 )
1020 (-1.0,0):( 0.64805427366389, 0 )
1021 (-0.5,0):( 0.88681888397007, 0 )
1023 ( 0.5,0):( 0.88681888397007, 0 )
1024 ( 1.0,0):( 0.64805427366389, 0 )
1025 ( 2.0,0):( 0.26580222883408, 0 )
1028 ( 2, 3):( -0.26351297515839, -0.03621163655877)
1029 (-2, 3):( -0.26351297515839, 0.03621163655877)
1030 (-2,-3):( -0.26351297515839, -0.03621163655877)
1031 ( 2,-3):( -0.26351297515839, 0.03621163655877)
1034 (-2.0,0):( -0.27572056477178, 0 )
1035 (-1.0,0):( -0.85091812823932, 0 )
1036 (-0.5,0):( -1.91903475133494, 0 )
1037 ( 0.5,0):( 1.91903475133494, 0 )
1038 ( 1.0,0):( 0.85091812823932, 0 )
1039 ( 2.0,0):( 0.27572056477178, 0 )
1042 ( 2, 3):( -0.27254866146294, -0.04030057885689)
1043 (-2, 3):( 0.27254866146294, -0.04030057885689)
1044 (-2,-3):( 0.27254866146294, 0.04030057885689)
1045 ( 2,-3):( -0.27254866146294, 0.04030057885689)
1048 (-2.0,0):( -1.03731472072755, 0 )
1049 (-1.0,0):( -1.31303528549933, 0 )
1050 (-0.5,0):( -2.16395341373865, 0 )
1051 ( 0.5,0):( 2.16395341373865, 0 )
1052 ( 1.0,0):( 1.31303528549933, 0 )
1053 ( 2.0,0):( 1.03731472072755, 0 )
1056 ( 2, 3):( 1.03574663776500, 0.01060478347034)
1057 (-2, 3):( -1.03574663776500, 0.01060478347034)
1058 (-2,-3):( -1.03574663776500, -0.01060478347034)
1059 ( 2,-3):( 1.03574663776500, -0.01060478347034)
1062 (-2.0,0):( -1.44363547517881, 0 )
1063 (-1.0,0):( -0.88137358701954, 0 )
1064 (-0.5,0):( -0.48121182505960, 0 )
1066 ( 0.5,0):( 0.48121182505960, 0 )
1067 ( 1.0,0):( 0.88137358701954, 0 )
1068 ( 2.0,0):( 1.44363547517881, 0 )
1071 ( 2, 3):( 1.96863792579310, 0.96465850440760)
1072 (-2, 3):( -1.96863792579310, 0.96465850440761)
1073 (-2,-3):( -1.96863792579310, -0.96465850440761)
1074 ( 2,-3):( 1.96863792579310, -0.96465850440760)
1077 (-2.0,0):( 1.31695789692482, 3.14159265358979)
1078 (-1.0,0):( 0, 3.14159265358979)
1079 (-0.5,0):( 0, 2.09439510239320)
1080 ( 0.0,0):( 0, 1.57079632679490)
1081 ( 0.5,0):( 0, 1.04719755119660)
1083 ( 2.0,0):( 1.31695789692482, 0 )
1086 ( 2, 3):( 1.98338702991654, 1.00014354247380)
1087 (-2, 3):( 1.98338702991653, 2.14144911111600)
1088 (-2,-3):( 1.98338702991653, -2.14144911111600)
1089 ( 2,-3):( 1.98338702991654, -1.00014354247380)
1092 (-2.0,0):( -0.54930614433405, 1.57079632679490)
1093 (-0.5,0):( -0.54930614433405, 0 )
1095 ( 0.5,0):( 0.54930614433405, 0 )
1096 ( 2.0,0):( 0.54930614433405, 1.57079632679490)
1099 ( 2, 3):( 0.14694666622553, 1.33897252229449)
1100 (-2, 3):( -0.14694666622553, 1.33897252229449)
1101 (-2,-3):( -0.14694666622553, -1.33897252229449)
1102 ( 2,-3):( 0.14694666622553, -1.33897252229449)
1105 (-2.0,0):( 0 , 2.09439510239320)
1106 (-1.0,0):( 0 , 3.14159265358979)
1107 (-0.5,0):( 1.31695789692482, 3.14159265358979)
1108 ( 0.5,0):( 1.31695789692482, 0 )
1110 ( 2.0,0):( 0 , 1.04719755119660)
1113 ( 2, 3):( 0.23133469857397, -1.42041072246703)
1114 (-2, 3):( 0.23133469857397, -1.72118193112276)
1115 (-2,-3):( 0.23133469857397, 1.72118193112276)
1116 ( 2,-3):( 0.23133469857397, 1.42041072246703)
1119 (-2.0,0):( -0.48121182505960, 0 )
1120 (-1.0,0):( -0.88137358701954, 0 )
1121 (-0.5,0):( -1.44363547517881, 0 )
1122 ( 0.5,0):( 1.44363547517881, 0 )
1123 ( 1.0,0):( 0.88137358701954, 0 )
1124 ( 2.0,0):( 0.48121182505960, 0 )
1127 ( 2, 3):( 0.15735549884499, -0.22996290237721)
1128 (-2, 3):( -0.15735549884499, -0.22996290237721)
1129 (-2,-3):( -0.15735549884499, 0.22996290237721)
1130 ( 2,-3):( 0.15735549884499, 0.22996290237721)
1133 (-2.0,0):( -0.54930614433405, 0 )
1134 (-0.5,0):( -0.54930614433405, 1.57079632679490)
1135 ( 0.5,0):( 0.54930614433405, 1.57079632679490)
1136 ( 2.0,0):( 0.54930614433405, 0 )
1139 ( 2, 3):( 0.14694666622553, -0.23182380450040)
1140 (-2, 3):( -0.14694666622553, -0.23182380450040)
1141 (-2,-3):( -0.14694666622553, 0.23182380450040)
1142 ( 2,-3):( 0.14694666622553, 0.23182380450040)