Change 29932 by [EMAIL PROTECTED] on 2007/01/23 02:14:57

        Upgrade to Math-Complex-1.37.

Affected files ...

... //depot/perl/lib/Math/Complex.pm#32 edit
... //depot/perl/lib/Math/Trig.pm#25 edit
... //depot/perl/lib/Math/Trig.t#6 edit

Differences ...

==== //depot/perl/lib/Math/Complex.pm#32 (text) ====
Index: perl/lib/Math/Complex.pm
--- perl/lib/Math/Complex.pm#31~28494~  2006-07-06 08:18:58.000000000 -0700
+++ perl/lib/Math/Complex.pm    2007-01-22 18:14:57.000000000 -0800
@@ -9,11 +9,11 @@
 
 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $Inf);
 
-$VERSION = 1.36;
+$VERSION = 1.37;
 
 BEGIN {
     unless ($^O eq 'unicosmk') {
-        my $e = $!;
+        local $!;
        # We do want an arithmetic overflow, Inf INF inf Infinity:.
         undef $Inf unless eval <<'EOE' and $Inf =~ /^inf(?:inity)?$/i;
          local $SIG{FPE} = sub {die};
@@ -27,7 +27,6 @@
            $Inf = $t + "1e99999999999999999999999999999999";
 EOE
        }
-        $! = $e; # Clear ERANGE.
     }
     $Inf = "Inf" if !defined $Inf || !($Inf > 0); # Desperation.
 }

==== //depot/perl/lib/Math/Trig.pm#25 (text) ====
Index: perl/lib/Math/Trig.pm
--- perl/lib/Math/Trig.pm#24~28494~     2006-07-06 08:18:58.000000000 -0700
+++ perl/lib/Math/Trig.pm       2007-01-22 18:14:57.000000000 -0800
@@ -189,7 +189,7 @@
     my $z = $A * sin($lat0)                + $B * sin($lat1);
 
     my $theta = atan2($y, $x);
-    my $phi   = atan2($z, sqrt($x*$x + $y*$y));
+    my $phi   = acos($z);
     
     return ($theta, $phi);
 }
@@ -647,7 +647,7 @@
 
     my @M = great_circle_midpoint(@L, @T);
 
-or about 68.11N 24.74E, in the Finnish Lapland.
+or about 89.16N 68.93E, practically at the North Pole.
 
 =head2 CAVEAT FOR GREAT CIRCLE FORMULAS
 

==== //depot/perl/lib/Math/Trig.t#6 (xtext) ====
Index: perl/lib/Math/Trig.t
--- perl/lib/Math/Trig.t#5~28494~       2006-07-06 08:18:58.000000000 -0700
+++ perl/lib/Math/Trig.t        2007-01-22 18:14:57.000000000 -0800
@@ -207,37 +207,37 @@
 
     ok(near($lon, $London[0]));
 
-    ok(near($lat, $pip2 - $London[1]));
+    ok(near($lat, $London[1]));
 
     ($lon, $lat) = great_circle_waypoint(@London, @Tokyo, 1.0);
 
     ok(near($lon, $Tokyo[0]));
 
-    ok(near($lat, $pip2 - $Tokyo[1]));
+    ok(near($lat, $Tokyo[1]));
 
     ($lon, $lat) = great_circle_waypoint(@London, @Tokyo, 0.5);
 
-    ok(near($lon, 1.55609593577679)); # 89.1577 E
+    ok(near($lon, 1.55609593577679)); # 89.16 E
 
-    ok(near($lat, 1.20296099733328)); # 68.9246 N
+    ok(near($lat, 0.36783532946162)); # 68.93 N
 
     ($lon, $lat) = great_circle_midpoint(@London, @Tokyo);
 
-    ok(near($lon, 1.55609593577679)); # 89.1577 E
+    ok(near($lon, 1.55609593577679)); # 89.16 E
 
-    ok(near($lat, 1.20296099733328)); # 68.9246 N
+    ok(near($lat, 0.367835329461615)); # 68.93 N
 
     ($lon, $lat) = great_circle_waypoint(@London, @Tokyo, 0.25);
 
-    ok(near($lon, 0.516073562850837)); # 29.5688 E
+    ok(near($lon, 0.516073562850837)); # 29.57 E
 
-    ok(near($lat, 1.170565013391510)); # 67.0684 N
+    ok(near($lat, 0.400231313403387)); # 67.07 N
 
     ($lon, $lat) = great_circle_waypoint(@London, @Tokyo, 0.75);
 
-    ok(near($lon, 2.17494903805952)); # 124.6154 E
+    ok(near($lon, 2.17494903805952)); # 124.62 E
 
-    ok(near($lat, 0.952987032741305)); # 54.6021 N
+    ok(near($lat, 0.617809294053591)); # 54.60 N
 
     use Math::Trig 'great_circle_destination';
 
End of Patch.

Reply via email to