diff options
author | Steve Peters <steve@fisharerojo.org> | 2008-01-13 15:28:30 +0000 |
---|---|---|
committer | Steve Peters <steve@fisharerojo.org> | 2008-01-13 15:28:30 +0000 |
commit | 7637cd0734b6068e23bb0804d6e84410ea017c73 (patch) | |
tree | d55e57197f479a42e7e6171f0179d4f6b1a1ba86 /lib | |
parent | 9f621bb00a11fa3741b155ff668ae147fed95cf0 (diff) | |
download | perl-7637cd0734b6068e23bb0804d6e84410ea017c73.tar.gz |
Upgrade to Math-Complex-1.44
p4raw-id: //depot/perl@32970
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Math/Complex.pm | 15 | ||||
-rwxr-xr-x | lib/Math/Complex.t | 2 | ||||
-rw-r--r-- | lib/Math/Trig.pm | 6 | ||||
-rwxr-xr-x | lib/Math/Trig.t | 10 |
4 files changed, 25 insertions, 8 deletions
diff --git a/lib/Math/Complex.pm b/lib/Math/Complex.pm index 3840219537..c9af42a087 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<pi> 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<Math::Trig> + =head1 AUTHORS Daniel S. Lewart <F<lewart!at!uiuc.edu>> diff --git a/lib/Math/Complex.t b/lib/Math/Complex.t index 87a6bf7194..1abb5b58b0 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 f3a84e6a52..3c864b1b74 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<Math::Complex> + =head1 AUTHORS Jarkko Hietaniemi <F<jhi!at!iki.fi>> and diff --git a/lib/Math/Trig.t b/lib/Math/Trig.t index b05e636280..9febaccdea 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()); |