summaryrefslogtreecommitdiff
path: root/lib/Math/Complex.pm
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-08-21 17:51:29 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-08-21 17:51:29 +0000
commitffb4440d02d1e8964757828cffb3de1e6f18ad0b (patch)
treec51ef7b66536f6a3abf6bf7d3676069c9cb0f823 /lib/Math/Complex.pm
parent3b8e344363267faf6fdd62dfd9712dccdf2dc61e (diff)
downloadperl-ffb4440d02d1e8964757828cffb3de1e6f18ad0b.tar.gz
Unicos/mk requires elaborate paranoia.
p4raw-id: //depot/perl@6750
Diffstat (limited to 'lib/Math/Complex.pm')
-rw-r--r--lib/Math/Complex.pm11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/Math/Complex.pm b/lib/Math/Complex.pm
index af2b2a0567..ece2aad06c 100644
--- a/lib/Math/Complex.pm
+++ b/lib/Math/Complex.pm
@@ -12,10 +12,13 @@ $VERSION = "1.30";
our($VERSION, @ISA, @EXPORT, %EXPORT_TAGS, $Inf);
BEGIN {
- my $e = $!;
- $Inf = CORE::exp(CORE::exp(30)); # We do want an arithmetic overflow.
- $! = $e; # Clear ERANGE.
- undef $Inf unless $Inf =~ /^inf(?:inity)?$/i; # Inf INF inf Infinity
+ unless ($^O eq 'unicosmk') {
+ my $e = $!;
+ # We do want an arithmetic overflow.
+ eval '$Inf = CORE::exp(CORE::exp(30))';
+ $! = $e; # Clear ERANGE.
+ undef $Inf unless $Inf =~ /^inf(?:inity)?$/i; # Inf INF inf Infinity
+ }
$Inf = "Inf" if !defined $Inf || !($Inf > 0); # Desperation.
}