diff options
author | Florian Ragwitz <rafl@debian.org> | 2010-09-10 05:42:43 +0200 |
---|---|---|
committer | Florian Ragwitz <rafl@debian.org> | 2010-09-10 05:42:43 +0200 |
commit | 4af46cb86a18ea6af79739bf5f9574a30d36e844 (patch) | |
tree | 654dea3473d695170353d4d15ee8a14d7e104b36 /dist | |
parent | 1030c62f0a1814b0bea8adb52771ca6dc0ea4a55 (diff) | |
download | perl-4af46cb86a18ea6af79739bf5f9574a30d36e844.tar.gz |
is_pos means > 0, not >= 0
Closes CPANRT#61204.
Diffstat (limited to 'dist')
-rw-r--r-- | dist/Math-BigInt/lib/Math/BigInt.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/dist/Math-BigInt/lib/Math/BigInt.pm b/dist/Math-BigInt/lib/Math/BigInt.pm index 20bd345a5e..95501250bf 100644 --- a/dist/Math-BigInt/lib/Math/BigInt.pm +++ b/dist/Math-BigInt/lib/Math/BigInt.pm @@ -1497,13 +1497,13 @@ sub is_even sub is_positive { - # return true when arg (BINT or num_str) is positive (>= 0) + # return true when arg (BINT or num_str) is positive (> 0) my ($self,$x) = ref($_[0]) ? (undef,$_[0]) : objectify(1,@_); return 1 if $x->{sign} eq '+inf'; # +inf is positive - + # 0+ is neither positive nor negative - ($x->{sign} eq '+' && !$x->is_zero()) ? 1 : 0; + ($x->{sign} eq '+' && !$x->is_zero()) ? 1 : 0; } sub is_negative @@ -3135,8 +3135,8 @@ Math::BigInt - Arbitrary size integer/float math package $x->is_one('-'); # if $x is -1 $x->is_odd(); # if $x is odd $x->is_even(); # if $x is even - $x->is_pos(); # if $x >= 0 - $x->is_neg(); # if $x < 0 + $x->is_pos(); # if $x > 0 + $x->is_neg(); # if $x < 0 $x->is_inf($sign); # if $x is +inf, or -inf (sign is default '+') $x->is_int(); # if $x is an integer (not a float) |