From: Steve Peters Date: Sun, 13 Jan 2008 15:28:30 +0000 (+0000) Subject: Upgrade to Math-Complex-1.44 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7637cd0734b6068e23bb0804d6e84410ea017c73;p=p5sagit%2Fp5-mst-13.2.git Upgrade to Math-Complex-1.44 p4raw-id: //depot/perl@32970 --- diff --git a/lib/Math/Complex.pm b/lib/Math/Complex.pm index 3840219..c9af42a 100644 --- a/lib/Math/Complex.pm +++ b/lib/Math/Complex.pm @@ -9,7 +9,7 @@ package Math::Complex; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $Inf); -$VERSION = 1.43; +$VERSION = 1.44; BEGIN { # For 64-bit doubles, anyway. @@ -1927,6 +1927,8 @@ Here are some examples: $j->arg(2); # (the last two aka rho, theta) # can be used also as mutators. +=head1 CONSTANTS + =head2 PI The constant C and some handy multiples of it (pi2, pi4, @@ -1955,6 +1957,13 @@ it can be for example any of or it can be something else. +Also note that in some platforms trying to use the infinity in +arithmetic operations may result in Perl crashing because using +an infinity causes SIGFPE or its moral equivalent to be sent. +The way to ignore this is + + local $SIG{FPE} = sub { }; + =head1 ERRORS DUE TO DIVISION BY ZERO OR LOGARITHM OF ZERO The division (/) and the following functions @@ -2019,6 +2028,10 @@ in root(), cos(), sin(), cosh(), sinh(), losing accuracy fast. Beware. The bug may be in UNICOS math libs, in UNICOS C compiler, in Math::Complex. Whatever it is, it does not manifest itself anywhere else where Perl runs. +=head1 SEE ALSO + +L + =head1 AUTHORS Daniel S. Lewart > diff --git a/lib/Math/Complex.t b/lib/Math/Complex.t index 87a6bf7..1abb5b5 100755 --- a/lib/Math/Complex.t +++ b/lib/Math/Complex.t @@ -13,7 +13,7 @@ BEGIN { } } -use Math::Complex 1.43; +use Math::Complex 1.44; use vars qw($VERSION); diff --git a/lib/Math/Trig.pm b/lib/Math/Trig.pm index f3a84e6..3c864b1 100644 --- a/lib/Math/Trig.pm +++ b/lib/Math/Trig.pm @@ -10,14 +10,14 @@ package Math::Trig; use 5.005; use strict; -use Math::Complex 1.43; +use Math::Complex 1.44; use Math::Complex qw(:trig :pi); use vars qw($VERSION $PACKAGE @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); @ISA = qw(Exporter); -$VERSION = 1.08; +$VERSION = 1.09; my @angcnv = qw(rad2deg rad2grad deg2rad deg2grad @@ -669,6 +669,8 @@ an answer instead of giving a fatal runtime error. Do not attempt navigation using these formulas. +L + =head1 AUTHORS Jarkko Hietaniemi > and diff --git a/lib/Math/Trig.t b/lib/Math/Trig.t index b05e636..9febacc 100755 --- a/lib/Math/Trig.t +++ b/lib/Math/Trig.t @@ -28,8 +28,8 @@ BEGIN { plan(tests => 135); -use Math::Trig 1.08; -use Math::Trig 1.08 qw(Inf); +use Math::Trig 1.09; +use Math::Trig 1.09 qw(Inf); my $pip2 = pi / 2; @@ -311,8 +311,10 @@ print "# Infinity\n"; my $BigDouble = 1e40; -ok(Inf() > $BigDouble); -ok(Inf() + $BigDouble > $BigDouble); +local $SIG{FPE} = { }; # E.g. netbsd-alpha core dumps on Inf arith + +ok(Inf() > $BigDouble); # This passes in netbsd-alpha. +ok(Inf() + $BigDouble > $BigDouble); # This coredumps. ok(Inf() + $BigDouble == Inf()); ok(Inf() - $BigDouble > $BigDouble); ok(Inf() - $BigDouble == Inf());