use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $Inf);
-$VERSION = 1.47;
+$VERSION = 1.48;
BEGIN {
# For 64-bit doubles, anyway.
$Inf = $IEEE_DBL_MAX unless defined $Inf; # Oh well, close enough.
die "Could not get Infinity" unless $Inf > 1e99;
}
+ print "# On this machine, Inf = '$Inf'\n";
}
use strict;
if ($x =~ /^NaN[QS]?$/i) {
$re = $x;
} else {
- if ($x =~ /^-?$Inf$/oi) {
+ if ($x =~ /^-?\Q$Inf\E$/oi) {
$re = $x;
} else {
$re = defined $format ? sprintf($format, $x) : $x;
if ($y =~ /^(NaN[QS]?)$/i) {
$im = $y;
} else {
- if ($y =~ /^-?$Inf$/oi) {
+ if ($y =~ /^-?\Q$Inf\E$/oi) {
$im = $y;
} else {
$im =
my %format = $z->display_format;
my $format = $format{format};
- if ($t =~ /^NaN[QS]?$/i || $t =~ /^-?$Inf$/oi) {
+ if ($t =~ /^NaN[QS]?$/i || $t =~ /^-?\Q$Inf\E$/oi) {
$theta = $t;
} elsif ($t == pi) {
$theta = "pi";
use 5.005;
use strict;
-use Math::Complex 1.47;
+use Math::Complex 1.48;
use Math::Complex qw(:trig :pi);
use vars qw($VERSION $PACKAGE @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
@ISA = qw(Exporter);
-$VERSION = 1.12;
+$VERSION = 1.13;
my @angcnv = qw(rad2deg rad2grad
deg2rad deg2grad
plan(tests => 153);
-use Math::Trig 1.12;
-use Math::Trig 1.12 qw(:pi Inf);
+use Math::Trig 1.13;
+use Math::Trig 1.13 qw(:pi Inf);
my $pip2 = pi / 2;
my $BigDouble = 1e40;
-local $SIG{FPE} = { }; # E.g. netbsd-alpha core dumps on Inf arith
+# E.g. netbsd-alpha core dumps on Inf arith without this.
+local $SIG{FPE} = { };
ok(Inf() > $BigDouble); # This passes in netbsd-alpha.
-ok(Inf() + $BigDouble > $BigDouble); # This coredumps.
+ok(Inf() + $BigDouble > $BigDouble); # This coredumps in netbsd-alpha.
ok(Inf() + $BigDouble == Inf());
ok(Inf() - $BigDouble > $BigDouble);
ok(Inf() - $BigDouble == Inf());