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
10 if ($ENV{PERL_CORE}) {
16 use Math::Complex 1.48;
18 use vars qw($VERSION);
22 my ($args, $op, $target, $test, $test_set, $try, $val, $zvalue, @set, @val);
27 'my ($res, $s0,$s1,$s2,$s3,$s4,$s5,$s6,$s7,$s8,$s9,$s10,$z0,$z1,$z2);' .
32 if ($^O eq 'unicos') { # For some reason root() produces very inaccurate
33 $eps = 1e-10; # results in Cray UNICOS, and occasionally also
34 } # cos(), sin(), cosh(), sinh(). The division
35 # of doubles is the current suspect.
39 next if $_ eq '' || /^\#/;
41 $test_set = 0; # Assume not a test over a set of values
47 set($1, \@set, \@val);
51 $test_set = 1; # Requests we loop over the set...
53 my @args = split(/:/);
56 for ($i = 0; $i < @set; $i++) {
59 # textual value as found in set definition
61 test($zvalue, $target, @args);
64 test($op, undef, @args);
74 push(@script, <<'EOT');
79 print "# $test Re(z) = ",$z->Re(), " Im(z) = ", $z->Im(), " z = $z\n";
80 print 'not ' unless Re($z) == 2 and Im($z) == 3;
82 push(@script, qq(print "ok $test\\n"}\n));
85 push(@script, <<'EOT');
89 print "# $test Re(z) = ",$z->Re(), " Im(z) = ", $z->Im(), " z = $z\n";
90 print 'not ' unless (abs($z) - 3 * sqrt(2)) < $eps and
91 (arg($z) - pi / 4 ) < $eps and
92 (Re($z) - 3 ) < $eps and
95 push(@script, qq(print "ok $test\\n"}\n));
98 push(@script, <<'EOT');
101 $z->arg(-3 / 4 * pi);
102 print "# $test Re(z) = ",$z->Re(), " Im(z) = ", $z->Im(), " z = $z\n";
103 print 'not ' unless (arg($z) + 3 / 4 * pi) < $eps and
104 (abs($z) - sqrt(2) ) < $eps and
105 (Re($z) + 1 ) < $eps and
106 (Im($z) + 1 ) < $eps;
108 push(@script, qq(print "ok $test\\n"}\n));
115 my $pi = cplx(pi, 0);
116 my $pii = cplx(0, pi);
117 my $pip2 = cplx(pi/2, 0);
118 my $pip4 = cplx(pi/4, 0);
119 my $zero = cplx(0, 0);
123 push(@script, $constants);
126 # test the divbyzeros
131 push(@script, <<EOT);
133 (\$bad) = (\$@ =~ /(.+)/);
134 print "# $test op = $op divbyzero? \$bad...\n";
135 print 'not ' unless (\$@ =~ /Division by zero/);
137 push(@script, qq(print "ok $test\\n";\n));
141 # test the logofzeros
146 push(@script, <<EOT);
148 (\$bad) = (\$@ =~ /(.+)/);
149 print "# $test op = $op logofzero? \$bad...\n";
150 print 'not ' unless (\$@ =~ /Logarithm of zero/);
152 push(@script, qq(print "ok $test\\n";\n));
160 # 'acoth(-1)', # Log of zero.
168 # 'atanh(-1)', # Log of zero.
174 'atan(cplx(0, 1), cplx(1, 0))',
190 push(@script, <<EOT);
192 (\$bad) = (\$@ =~ /(.+)/);
193 print "# $test op = $op badroot? \$bad...\n";
194 print 'not ' unless (\$@ =~ /root rank must be/);
196 push(@script, qq(print "ok $test\\n";\n));
200 test_broot(qw(-3 -2.1 0 0.99));
202 sub test_display_format {
205 print "# package display_format cartesian?\n";
206 print "not " unless Math::Complex->display_format eq 'cartesian';
211 my \$j = (root(1,3))[1];
213 \$j->display_format('polar');
218 print "# j display_format polar?\n";
219 print "not " unless \$j->display_format eq 'polar';
226 print "not " unless "\$j" eq "[1,2pi/3]";
231 %display_format = \$j->display_format;
236 print "# display_format{style} polar?\n";
237 print "not " unless \$display_format{style} eq 'polar';
243 print "# keys %display_format == 2?\n";
244 print "not " unless keys %display_format == 2;
247 \$j->display_format('style' => 'cartesian', 'format' => '%.5f');
253 print "not " unless "\$j" eq "-0.50000+0.86603i";
256 %display_format = \$j->display_format;
261 print "# display_format{format} %.5f?\n";
262 print "not " unless \$display_format{format} eq '%.5f';
268 print "# keys %display_format == 3?\n";
269 print "not " unless keys %display_format == 3;
272 \$j->display_format('format' => undef);
278 print "not " unless "\$j" =~ /^-0(?:\\.5(?:0000\\d+)?|\\.49999\\d+)\\+0.86602540\\d+i\$/;
281 \$j->display_format('style' => 'polar', 'polar_pretty_print' => 0);
287 print "not " unless "\$j" =~ /^\\[1,2\\.09439510\\d+\\]\$/;
290 \$j->display_format('style' => 'cartesian', 'format' => '(%.5g)');
296 print "not " unless "\$j" eq "(-0.5)+(0.86603)i";
302 print "# j display_format cartesian?\n";
303 print "not " unless \$j->display_format eq 'cartesian';
308 test_display_format();
313 print "# remake 2+3i\n";
315 print "not " unless \$z == Math::Complex->make(2,3);
322 \$z = Math::Complex->make('3i');
323 print "not " unless \$z == cplx(0,3);
329 print "# emake [2,3]\n";
330 \$z = Math::Complex->emake('[2,3]');
331 print "not " unless \$z == cplxe(2,3);
337 print "# make (2,3)\n";
338 \$z = Math::Complex->make('(2,3)');
339 print "not " unless \$z == cplx(2,3);
345 print "# emake [2,3pi/8]\n";
346 \$z = Math::Complex->emake('[2,3pi/8]');
347 print "not " unless \$z == cplxe(2,3*\$pi/8);
353 print "# emake [2]\n";
354 \$z = Math::Complex->emake('[2]');
355 print "not " unless \$z == cplxe(2);
361 push @script, <<'EOS';
363 print "# cplx, cplxe, make, emake without arguments\n";
369 print ((\$z0->Re() == 0) ? "ok $test\n" : "not ok $test\n");
374 print ((\$z0->Im() == 0) ? "ok $test\n" : "not ok $test\n");
380 print ((\$z1->rho() == 0) ? "ok $test\n" : "not ok $test\n");
385 print ((\$z1->theta() == 0) ? "ok $test\n" : "not ok $test\n");
390 my \$z2 = Math::Complex->make();
391 print ((\$z2->Re() == 0) ? "ok $test\n" : "not ok $test\n");
396 print ((\$z2->Im() == 0) ? "ok $test\n" : "not ok $test\n");
401 my \$z3 = Math::Complex->emake();
402 print ((\$z3->rho() == 0) ? "ok $test\n" : "not ok $test\n");
407 print ((\$z3->theta() == 0) ? "ok $test\n" : "not ok $test\n");
413 push @script, <<'EOS';
414 print "# atan2() with some real arguments\n";
416 my @real = (-1, 0, 1);
419 next if $x == 0 && $y == 0;
422 print ((Math::Complex::atan2($y, $x) == CORE::atan2($y, $x)) ? "ok $test\n" : "not ok $test\n");
426 push @script, <<'EOS';
427 print "# atan2() with some complex arguments\n";
431 print (abs(atan2(0, cplx(0, 1))) < $eps ? "ok $test\n" : "not ok $test\n");
435 print (abs(atan2(cplx(0, 1), 0) - \$pip2) < $eps ? "ok $test\n" : "not ok $test\n");
439 print (abs(atan2(cplx(0, 1), cplx(0, 1)) - \$pip4) < $eps ? "ok $test\n" : "not ok $test\n");
443 print (abs(atan2(cplx(0, 1), cplx(1, 1)) - cplx(0.553574358897045, 0.402359478108525)) < $eps ? "ok $test\n" : "not ok $test\n");
459 #print @script, "\n";
460 eval join '', @script;
466 push(@script, qq(print "# $op=\n";));
470 my ($op, $z, @args) = @_;
474 $baop = 1 if ($op =~ s/;=$//);
475 for ($i = 0; $i < @args; $i++) {
476 $val = value($args[$i]);
477 push @script, "\$z$i = $val;\n";
480 $args = "'$op'"; # Really the value
481 $try = "abs(\$z0 - \$z1) <= $eps ? \$z1 : \$z0";
482 push @script, "\$res = $try; ";
483 push @script, "check($test, $args[0], \$res, \$z$#args, $args);\n";
488 $args = "'$args[0]'";
490 $try = ($op =~ /^\w/) ? "$op(\$z0, \$z1)" : "\$z0 $op \$z1";
491 $args = "'$args[0]', '$args[1]'";
493 push @script, "\$res = $try; ";
494 push @script, "check($test, '$try', \$res, \$z$#args, $args);\n";
495 if (@args > 2 and $baop) { # binary assignment ops
497 # check the op= works
500 my \$za = cplx(ref \$z0 ? \@{\$z0->_cartesian} : (\$z0, 0));
502 my (\$z1r, \$z1i) = ref \$z1 ? \@{\$z1->_cartesian} : (\$z1, 0);
504 my \$zb = cplx(\$z1r, \$z1i);
507 my (\$zbr, \$zbi) = \@{\$zb->_cartesian};
509 check($test, '\$z0 $op= \$z1', \$za, \$z$#args, $args);
512 # check that the rhs has not changed
513 push @script, qq(print "not " unless (\$zbr == \$z1r and \$zbi == \$z1i););
514 push @script, qq(print "ok $test\\n";\n);
521 my ($set, $setref, $valref) = @_;
524 my @set = split(/;\s*/, $set);
527 for ($i = 0; $i < @set; $i++) {
528 push(@{$valref}, $set[$i]);
529 my $val = value($set[$i]);
530 push @script, "\$s$i = $val;\n";
531 push @{$setref}, "\$s$i";
537 if (/^\s*\((.*),(.*)\)/) {
538 return "cplx($1,$2)";
540 elsif (/^\s*([\-\+]?(?:\d+(\.\d+)?|\.\d+)(?:[e[\-\+]\d+])?)/) {
543 elsif (/^\s*\[(.*),(.*)\]/) {
544 return "cplxe($1,$2)";
546 elsif (/^\s*'(.*)'/) {
548 $ex =~ s/\bz\b/$target/g;
549 $ex =~ s/\br\b/abs($target)/g;
550 $ex =~ s/\bt\b/arg($target)/g;
551 $ex =~ s/\ba\b/Re($target)/g;
552 $ex =~ s/\bb\b/Im($target)/g;
555 elsif (/^\s*"(.*)"/) {
562 my ($test, $try, $got, $expected, @z) = @_;
566 if ("$got" eq "$expected"
568 ($expected =~ /^-?\d/ && $got == $expected)
570 (abs(Math::Complex->make($got) - Math::Complex->make($expected)) < $eps)
572 (abs($got - $expected) < $eps)
576 print "not ok $test\n";
577 my $args = (@z == 1) ? "z = $z[0]" : "z0 = $z[0], z1 = $z[1]";
578 print "# '$try' expected: '$expected' got: '$got' for $args\n";
584 return ($z1 + i*$z2) * ($z1 - i*$z2);
589 return ($z1 + $z2) * ($z1 - $z2);
619 [2,2*pi/3]:(1,0):[2,2*pi/3]
631 [4,pi]:[2,pi/2]:[2,pi/2]
632 [2,pi/2]:[4,pi]:[0.5,-(pi)/2]
637 (2,3):(4,0):(-119,-120)
687 &_stringify_cartesian
699 [6, -2*pi/3]:"[6,-2pi/3]"
700 [0.5, -9*pi/11]:"[0.5,-9pi/11]"
702 { (4,3); [3,2]; (-3,4); (0,2); [2,1] }
705 |'z - ~z':'2*i*Im(z)'
706 |'z * ~z':'abs(z) * abs(z)'
708 { (0.5, 0); (-0.5, 0); (2,3); [3,2]; (-3,2); (0,2); 3; 1.2; (-3, 0); (-2, -1); [2,1] }
710 |'(root(z, 4))[1] ** 4':'z'
711 |'(root(z, 5))[3] ** 5':'z'
712 |'(root(z, 8))[7] ** 8':'z'
713 |'(root(z, 8, 0)) ** 8':'z'
714 |'(root(z, 8, 7)) ** 8':'z'
716 |'acot(z)':'acotan(z)'
717 |'acsc(z)':'acosec(z)'
718 |'acsc(z)':'asin(1 / z)'
719 |'asec(z)':'acos(1 / z)'
720 |'cbrt(z)':'cbrt(r) * exp(i * t/3)'
722 |'addsq(cos(z), sin(z))':1
723 |'cos(z)':'cosh(i*z)'
724 |'subsq(cosh(z), sinh(z))':1
726 |'cot(z)':'1 / tan(z)'
729 |'csc(z)':'1 / sin(z)'
732 |'exp(z)':'exp(a) * exp(i * b)'
735 |'log(z)':'log(r) + i*t'
736 |'log10(z)':'log(z) / log(10)'
737 |'logn(z, 2)':'log(z) / log(2)'
738 |'logn(z, 3)':'log(z) / log(3)'
740 |'sec(z)':'1 / cos(z)'
742 |'sin(i * z)':'i * sinh(z)'
743 |'sqrt(z) * sqrt(z)':'z'
744 |'sqrt(z)':'sqrt(r) * exp(i * t/2)'
746 |'z**z':'exp(z * log(z))'
748 { (1,1); [1,0.5]; (-2, -1); 2; -3; (-1,0.5); (0,0.5); 0.5; (2, 0); (-1, -2) }
750 |'cosh(acosh(z))':'z'
751 |'coth(acoth(z))':'z'
752 |'coth(z)':'1 / tanh(z)'
753 |'coth(z)':'cotanh(z)'
754 |'csch(acsch(z))':'z'
755 |'csch(z)':'1 / sinh(z)'
756 |'csch(z)':'cosech(z)'
757 |'sech(asech(z))':'z'
758 |'sech(z)':'1 / cosh(z)'
759 |'sinh(asinh(z))':'z'
760 |'tanh(atanh(z))':'z'
762 { (0.2,-0.4); [1,0.5]; -1.2; (-1,0.5); 0.5; (1.1, 0) }
764 |'acos(cos(z)) ** 2':'z * z'
765 |'acosh(cosh(z)) ** 2':'z * z'
766 |'acoth(z)':'acotanh(z)'
767 |'acoth(z)':'atanh(1 / z)'
768 |'acsch(z)':'acosech(z)'
769 |'acsch(z)':'asinh(1 / z)'
770 |'asech(z)':'acosh(1 / z)'
772 |'asinh(sinh(z))':'z'
774 |'atanh(tanh(z))':'z'
777 (-2.0,0):( 0.69314718055995, 3.14159265358979)
778 (-1.0,0):( 0 , 3.14159265358979)
779 (-0.5,0):( -0.69314718055995, 3.14159265358979)
780 ( 0.5,0):( -0.69314718055995, 0 )
782 ( 2.0,0):( 0.69314718055995, 0 )
785 ( 2, 3):( 1.28247467873077, 0.98279372324733)
786 (-2, 3):( 1.28247467873077, 2.15879893034246)
787 (-2,-3):( 1.28247467873077, -2.15879893034246)
788 ( 2,-3):( 1.28247467873077, -0.98279372324733)
791 (-2.0,0):( -0.90929742682568, 0 )
792 (-1.0,0):( -0.84147098480790, 0 )
793 (-0.5,0):( -0.47942553860420, 0 )
795 ( 0.5,0):( 0.47942553860420, 0 )
796 ( 1.0,0):( 0.84147098480790, 0 )
797 ( 2.0,0):( 0.90929742682568, 0 )
800 ( 2, 3):( 9.15449914691143, -4.16890695996656)
801 (-2, 3):( -9.15449914691143, -4.16890695996656)
802 (-2,-3):( -9.15449914691143, 4.16890695996656)
803 ( 2,-3):( 9.15449914691143, 4.16890695996656)
806 (-2.0,0):( -0.41614683654714, 0 )
807 (-1.0,0):( 0.54030230586814, 0 )
808 (-0.5,0):( 0.87758256189037, 0 )
810 ( 0.5,0):( 0.87758256189037, 0 )
811 ( 1.0,0):( 0.54030230586814, 0 )
812 ( 2.0,0):( -0.41614683654714, 0 )
815 ( 2, 3):( -4.18962569096881, -9.10922789375534)
816 (-2, 3):( -4.18962569096881, 9.10922789375534)
817 (-2,-3):( -4.18962569096881, -9.10922789375534)
818 ( 2,-3):( -4.18962569096881, 9.10922789375534)
821 (-2.0,0):( 2.18503986326152, 0 )
822 (-1.0,0):( -1.55740772465490, 0 )
823 (-0.5,0):( -0.54630248984379, 0 )
825 ( 0.5,0):( 0.54630248984379, 0 )
826 ( 1.0,0):( 1.55740772465490, 0 )
827 ( 2.0,0):( -2.18503986326152, 0 )
830 ( 2, 3):( -0.00376402564150, 1.00323862735361)
831 (-2, 3):( 0.00376402564150, 1.00323862735361)
832 (-2,-3):( 0.00376402564150, -1.00323862735361)
833 ( 2,-3):( -0.00376402564150, -1.00323862735361)
836 (-2.0,0):( -2.40299796172238, 0 )
837 (-1.0,0):( 1.85081571768093, 0 )
838 (-0.5,0):( 1.13949392732455, 0 )
840 ( 0.5,0):( 1.13949392732455, 0 )
841 ( 1.0,0):( 1.85081571768093, 0 )
842 ( 2.0,0):( -2.40299796172238, 0 )
845 ( 2, 3):( -0.04167496441114, 0.09061113719624)
846 (-2, 3):( -0.04167496441114, -0.09061113719624)
847 (-2,-3):( -0.04167496441114, 0.09061113719624)
848 ( 2,-3):( -0.04167496441114, -0.09061113719624)
851 (-2.0,0):( -1.09975017029462, 0 )
852 (-1.0,0):( -1.18839510577812, 0 )
853 (-0.5,0):( -2.08582964293349, 0 )
854 ( 0.5,0):( 2.08582964293349, 0 )
855 ( 1.0,0):( 1.18839510577812, 0 )
856 ( 2.0,0):( 1.09975017029462, 0 )
859 ( 2, 3):( 0.09047320975321, 0.04120098628857)
860 (-2, 3):( -0.09047320975321, 0.04120098628857)
861 (-2,-3):( -0.09047320975321, -0.04120098628857)
862 ( 2,-3):( 0.09047320975321, -0.04120098628857)
865 (-2.0,0):( 0.45765755436029, 0 )
866 (-1.0,0):( -0.64209261593433, 0 )
867 (-0.5,0):( -1.83048772171245, 0 )
868 ( 0.5,0):( 1.83048772171245, 0 )
869 ( 1.0,0):( 0.64209261593433, 0 )
870 ( 2.0,0):( -0.45765755436029, 0 )
873 ( 2, 3):( -0.00373971037634, -0.99675779656936)
874 (-2, 3):( 0.00373971037634, -0.99675779656936)
875 (-2,-3):( 0.00373971037634, 0.99675779656936)
876 ( 2,-3):( -0.00373971037634, 0.99675779656936)
879 (-2.0,0):( -1.57079632679490, 1.31695789692482)
880 (-1.0,0):( -1.57079632679490, 0 )
881 (-0.5,0):( -0.52359877559830, 0 )
883 ( 0.5,0):( 0.52359877559830, 0 )
884 ( 1.0,0):( 1.57079632679490, 0 )
885 ( 2.0,0):( 1.57079632679490, -1.31695789692482)
888 ( 2, 3):( 0.57065278432110, 1.98338702991654)
889 (-2, 3):( -0.57065278432110, 1.98338702991654)
890 (-2,-3):( -0.57065278432110, -1.98338702991654)
891 ( 2,-3):( 0.57065278432110, -1.98338702991654)
894 (-2.0,0):( 3.14159265358979, -1.31695789692482)
895 (-1.0,0):( 3.14159265358979, 0 )
896 (-0.5,0):( 2.09439510239320, 0 )
897 ( 0.0,0):( 1.57079632679490, 0 )
898 ( 0.5,0):( 1.04719755119660, 0 )
900 ( 2.0,0):( 0 , 1.31695789692482)
903 ( 2, 3):( 1.00014354247380, -1.98338702991654)
904 (-2, 3):( 2.14144911111600, -1.98338702991654)
905 (-2,-3):( 2.14144911111600, 1.98338702991654)
906 ( 2,-3):( 1.00014354247380, 1.98338702991654)
909 (-2.0,0):( -1.10714871779409, 0 )
910 (-1.0,0):( -0.78539816339745, 0 )
911 (-0.5,0):( -0.46364760900081, 0 )
913 ( 0.5,0):( 0.46364760900081, 0 )
914 ( 1.0,0):( 0.78539816339745, 0 )
915 ( 2.0,0):( 1.10714871779409, 0 )
918 ( 2, 3):( 1.40992104959658, 0.22907268296854)
919 (-2, 3):( -1.40992104959658, 0.22907268296854)
920 (-2,-3):( -1.40992104959658, -0.22907268296854)
921 ( 2,-3):( 1.40992104959658, -0.22907268296854)
924 (-2.0,0):( 2.09439510239320, 0 )
925 (-1.0,0):( 3.14159265358979, 0 )
926 (-0.5,0):( 3.14159265358979, -1.31695789692482)
927 ( 0.5,0):( 0 , 1.31695789692482)
929 ( 2.0,0):( 1.04719755119660, 0 )
932 ( 2, 3):( 1.42041072246703, 0.23133469857397)
933 (-2, 3):( 1.72118193112276, 0.23133469857397)
934 (-2,-3):( 1.72118193112276, -0.23133469857397)
935 ( 2,-3):( 1.42041072246703, -0.23133469857397)
938 (-2.0,0):( -0.52359877559830, 0 )
939 (-1.0,0):( -1.57079632679490, 0 )
940 (-0.5,0):( -1.57079632679490, 1.31695789692482)
941 ( 0.5,0):( 1.57079632679490, -1.31695789692482)
942 ( 1.0,0):( 1.57079632679490, 0 )
943 ( 2.0,0):( 0.52359877559830, 0 )
946 ( 2, 3):( 0.15038560432786, -0.23133469857397)
947 (-2, 3):( -0.15038560432786, -0.23133469857397)
948 (-2,-3):( -0.15038560432786, 0.23133469857397)
949 ( 2,-3):( 0.15038560432786, 0.23133469857397)
952 (-2.0,0):( -0.46364760900081, 0 )
953 (-1.0,0):( -0.78539816339745, 0 )
954 (-0.5,0):( -1.10714871779409, 0 )
955 ( 0.5,0):( 1.10714871779409, 0 )
956 ( 1.0,0):( 0.78539816339745, 0 )
957 ( 2.0,0):( 0.46364760900081, 0 )
960 ( 2, 3):( 0.16087527719832, -0.22907268296854)
961 (-2, 3):( -0.16087527719832, -0.22907268296854)
962 (-2,-3):( -0.16087527719832, 0.22907268296854)
963 ( 2,-3):( 0.16087527719832, 0.22907268296854)
966 (-2.0,0):( -3.62686040784702, 0 )
967 (-1.0,0):( -1.17520119364380, 0 )
968 (-0.5,0):( -0.52109530549375, 0 )
970 ( 0.5,0):( 0.52109530549375, 0 )
971 ( 1.0,0):( 1.17520119364380, 0 )
972 ( 2.0,0):( 3.62686040784702, 0 )
975 ( 2, 3):( -3.59056458998578, 0.53092108624852)
976 (-2, 3):( 3.59056458998578, 0.53092108624852)
977 (-2,-3):( 3.59056458998578, -0.53092108624852)
978 ( 2,-3):( -3.59056458998578, -0.53092108624852)
981 (-2.0,0):( 3.76219569108363, 0 )
982 (-1.0,0):( 1.54308063481524, 0 )
983 (-0.5,0):( 1.12762596520638, 0 )
985 ( 0.5,0):( 1.12762596520638, 0 )
986 ( 1.0,0):( 1.54308063481524, 0 )
987 ( 2.0,0):( 3.76219569108363, 0 )
990 ( 2, 3):( -3.72454550491532, 0.51182256998738)
991 (-2, 3):( -3.72454550491532, -0.51182256998738)
992 (-2,-3):( -3.72454550491532, 0.51182256998738)
993 ( 2,-3):( -3.72454550491532, -0.51182256998738)
996 (-2.0,0):( -0.96402758007582, 0 )
997 (-1.0,0):( -0.76159415595576, 0 )
998 (-0.5,0):( -0.46211715726001, 0 )
1000 ( 0.5,0):( 0.46211715726001, 0 )
1001 ( 1.0,0):( 0.76159415595576, 0 )
1002 ( 2.0,0):( 0.96402758007582, 0 )
1005 ( 2, 3):( 0.96538587902213, -0.00988437503832)
1006 (-2, 3):( -0.96538587902213, -0.00988437503832)
1007 (-2,-3):( -0.96538587902213, 0.00988437503832)
1008 ( 2,-3):( 0.96538587902213, 0.00988437503832)
1011 (-2.0,0):( 0.26580222883408, 0 )
1012 (-1.0,0):( 0.64805427366389, 0 )
1013 (-0.5,0):( 0.88681888397007, 0 )
1015 ( 0.5,0):( 0.88681888397007, 0 )
1016 ( 1.0,0):( 0.64805427366389, 0 )
1017 ( 2.0,0):( 0.26580222883408, 0 )
1020 ( 2, 3):( -0.26351297515839, -0.03621163655877)
1021 (-2, 3):( -0.26351297515839, 0.03621163655877)
1022 (-2,-3):( -0.26351297515839, -0.03621163655877)
1023 ( 2,-3):( -0.26351297515839, 0.03621163655877)
1026 (-2.0,0):( -0.27572056477178, 0 )
1027 (-1.0,0):( -0.85091812823932, 0 )
1028 (-0.5,0):( -1.91903475133494, 0 )
1029 ( 0.5,0):( 1.91903475133494, 0 )
1030 ( 1.0,0):( 0.85091812823932, 0 )
1031 ( 2.0,0):( 0.27572056477178, 0 )
1034 ( 2, 3):( -0.27254866146294, -0.04030057885689)
1035 (-2, 3):( 0.27254866146294, -0.04030057885689)
1036 (-2,-3):( 0.27254866146294, 0.04030057885689)
1037 ( 2,-3):( -0.27254866146294, 0.04030057885689)
1040 (-2.0,0):( -1.03731472072755, 0 )
1041 (-1.0,0):( -1.31303528549933, 0 )
1042 (-0.5,0):( -2.16395341373865, 0 )
1043 ( 0.5,0):( 2.16395341373865, 0 )
1044 ( 1.0,0):( 1.31303528549933, 0 )
1045 ( 2.0,0):( 1.03731472072755, 0 )
1048 ( 2, 3):( 1.03574663776500, 0.01060478347034)
1049 (-2, 3):( -1.03574663776500, 0.01060478347034)
1050 (-2,-3):( -1.03574663776500, -0.01060478347034)
1051 ( 2,-3):( 1.03574663776500, -0.01060478347034)
1054 (-2.0,0):( -1.44363547517881, 0 )
1055 (-1.0,0):( -0.88137358701954, 0 )
1056 (-0.5,0):( -0.48121182505960, 0 )
1058 ( 0.5,0):( 0.48121182505960, 0 )
1059 ( 1.0,0):( 0.88137358701954, 0 )
1060 ( 2.0,0):( 1.44363547517881, 0 )
1063 ( 2, 3):( 1.96863792579310, 0.96465850440760)
1064 (-2, 3):( -1.96863792579310, 0.96465850440761)
1065 (-2,-3):( -1.96863792579310, -0.96465850440761)
1066 ( 2,-3):( 1.96863792579310, -0.96465850440760)
1069 (-2.0,0):( 1.31695789692482, 3.14159265358979)
1070 (-1.0,0):( 0, 3.14159265358979)
1071 (-0.5,0):( 0, 2.09439510239320)
1072 ( 0.0,0):( 0, 1.57079632679490)
1073 ( 0.5,0):( 0, 1.04719755119660)
1075 ( 2.0,0):( 1.31695789692482, 0 )
1078 ( 2, 3):( 1.98338702991654, 1.00014354247380)
1079 (-2, 3):( 1.98338702991653, 2.14144911111600)
1080 (-2,-3):( 1.98338702991653, -2.14144911111600)
1081 ( 2,-3):( 1.98338702991654, -1.00014354247380)
1084 (-2.0,0):( -0.54930614433405, 1.57079632679490)
1085 (-0.5,0):( -0.54930614433405, 0 )
1087 ( 0.5,0):( 0.54930614433405, 0 )
1088 ( 2.0,0):( 0.54930614433405, 1.57079632679490)
1091 ( 2, 3):( 0.14694666622553, 1.33897252229449)
1092 (-2, 3):( -0.14694666622553, 1.33897252229449)
1093 (-2,-3):( -0.14694666622553, -1.33897252229449)
1094 ( 2,-3):( 0.14694666622553, -1.33897252229449)
1097 (-2.0,0):( 0 , 2.09439510239320)
1098 (-1.0,0):( 0 , 3.14159265358979)
1099 (-0.5,0):( 1.31695789692482, 3.14159265358979)
1100 ( 0.5,0):( 1.31695789692482, 0 )
1102 ( 2.0,0):( 0 , 1.04719755119660)
1105 ( 2, 3):( 0.23133469857397, -1.42041072246703)
1106 (-2, 3):( 0.23133469857397, -1.72118193112276)
1107 (-2,-3):( 0.23133469857397, 1.72118193112276)
1108 ( 2,-3):( 0.23133469857397, 1.42041072246703)
1111 (-2.0,0):( -0.48121182505960, 0 )
1112 (-1.0,0):( -0.88137358701954, 0 )
1113 (-0.5,0):( -1.44363547517881, 0 )
1114 ( 0.5,0):( 1.44363547517881, 0 )
1115 ( 1.0,0):( 0.88137358701954, 0 )
1116 ( 2.0,0):( 0.48121182505960, 0 )
1119 ( 2, 3):( 0.15735549884499, -0.22996290237721)
1120 (-2, 3):( -0.15735549884499, -0.22996290237721)
1121 (-2,-3):( -0.15735549884499, 0.22996290237721)
1122 ( 2,-3):( 0.15735549884499, 0.22996290237721)
1125 (-2.0,0):( -0.54930614433405, 0 )
1126 (-0.5,0):( -0.54930614433405, 1.57079632679490)
1127 ( 0.5,0):( 0.54930614433405, 1.57079632679490)
1128 ( 2.0,0):( 0.54930614433405, 0 )
1131 ( 2, 3):( 0.14694666622553, -0.23182380450040)
1132 (-2, 3):( -0.14694666622553, -0.23182380450040)
1133 (-2,-3):( -0.14694666622553, 0.23182380450040)
1134 ( 2,-3):( 0.14694666622553, 0.23182380450040)