diff options
Diffstat (limited to 'lib/Math')
-rw-r--r-- | lib/Math/BigFloat.pm | 11 | ||||
-rw-r--r-- | lib/Math/Complex.pm | 2 | ||||
-rw-r--r-- | lib/Math/Trig.pm | 2 |
3 files changed, 8 insertions, 7 deletions
diff --git a/lib/Math/BigFloat.pm b/lib/Math/BigFloat.pm index 8aa6a6604b..1a9195e185 100644 --- a/lib/Math/BigFloat.pm +++ b/lib/Math/BigFloat.pm @@ -240,12 +240,13 @@ sub fcmp #(fnum_str, fnum_str) return cond_code if ($x eq "NaN" || $y eq "NaN") { undef; } else { + local($xm,$xe,$ym,$ye) = split('E', $x."E$y"); + if ($xm eq '+0' || $ym eq '+0') { + return $xm <=> $ym; + } ord($y) <=> ord($x) - || - ( local($xm,$xe,$ym,$ye) = split('E', $x."E$y"), - (($xe <=> $ye) * (substr($x,$[,1).'1') - || Math::BigInt::cmp($xm,$ym)) - ); + || ($xe <=> $ye) * (substr($x,$[,1).'1') + || Math::BigInt::cmp($xm,$ym); } } diff --git a/lib/Math/Complex.pm b/lib/Math/Complex.pm index 5b69039afc..b339573bc9 100644 --- a/lib/Math/Complex.pm +++ b/lib/Math/Complex.pm @@ -1746,7 +1746,7 @@ Whatever it is, it does not manifest itself anywhere else where Perl runs. =head1 AUTHORS -Raphael Manfredi <F<Raphael_Manfredi@grenoble.hp.com>> and +Raphael Manfredi <F<Raphael_Manfredi@pobox.com>> and Jarkko Hietaniemi <F<jhi@iki.fi>>. Extensive patches by Daniel S. Lewart <F<d-lewart@uiuc.edu>>. diff --git a/lib/Math/Trig.pm b/lib/Math/Trig.pm index d987b5cc76..c659137eba 100644 --- a/lib/Math/Trig.pm +++ b/lib/Math/Trig.pm @@ -435,7 +435,7 @@ an answer instead of giving a fatal runtime error. =head1 AUTHORS Jarkko Hietaniemi <F<jhi@iki.fi>> and -Raphael Manfredi <F<Raphael_Manfredi@grenoble.hp.com>>. +Raphael Manfredi <F<Raphael_Manfredi@pobox.com>>. =cut |