diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2000-04-28 13:14:04 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-04-28 13:14:04 +0000 |
commit | 6ca9dfe2c2ca29dacdf2d826bf559899968d12ae (patch) | |
tree | a787844c0ef405552ee1844a68ecb2ab5c9e0014 /lib/Math | |
parent | d9b225d823ecbc6d2b8048ea56f74bf2cc3479db (diff) | |
download | perl-6ca9dfe2c2ca29dacdf2d826bf559899968d12ae.tar.gz |
Preserve $!.
p4raw-id: //depot/cfgperl@5997
Diffstat (limited to 'lib/Math')
-rw-r--r-- | lib/Math/Complex.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Math/Complex.pm b/lib/Math/Complex.pm index 3fffcdef70..3c4894ad8e 100644 --- a/lib/Math/Complex.pm +++ b/lib/Math/Complex.pm @@ -73,8 +73,12 @@ my %DISPLAY_FORMAT = ('style' => 'cartesian', my $eps = 1e-14; # Epsilon my $Inf; -unless ($^O eq 'unicos') { # Unicos gets a fatal runtime error +# Unicos gets a fatal runtime error without -h matherr=errno in ccflags +unless ($^O eq 'unicos') { + my $e = $!; $Inf = CORE::exp(CORE::exp(30)); + $! = $e; # Clear ERANGE. + undef $Inf unless $Inf =~ /^inf$/; # Inf INF inf } $Inf = "Inf" if !defined $Inf || !$Inf > 0; |