diff options
author | Peter John Acklam <pjacklam@online.no> | 2010-11-05 11:52:14 +0100 |
---|---|---|
committer | Florian Ragwitz <rafl@debian.org> | 2010-11-07 16:01:11 +0100 |
commit | 3d6017f56e6b8f8227e1fd4570d7e7a67b7fc28a (patch) | |
tree | d0cae9560e492942bc3596b9e8ee6fcf75858c91 /dist/Math-BigInt/t/bare_mbf.t | |
parent | 4f039b22bd6382064369066e22a0750cdd4976b1 (diff) | |
download | perl-3d6017f56e6b8f8227e1fd4570d7e7a67b7fc28a.tar.gz |
RT ticket #62101: as_int() returns NaN for inf
Math::BigFloat -> binf() -> as_int() returns NaN, but should return
inf. In other words, if $x is a Math::BigFloat, then $x -> as_int()
shall return the same as Math::BigInt -> new($x). The bug appears both
for +inf and -inf.
-lib/Math/BigFloat.pm: Add two lines to catch the cases when the input
is +/-inf and NaN, respectively.
-t/bare_mbf.t: incremented test count by 3
-t/bigfltpm.inc: add 3 tests, for +inf, -inf, and NaN
-t/bigfltpm.t: incremented test count by 3
-t/sub_mbf.t: incremented test count by 3
-t/with_sub.t: incremented test count by 3
Diffstat (limited to 'dist/Math-BigInt/t/bare_mbf.t')
-rw-r--r-- | dist/Math-BigInt/t/bare_mbf.t | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dist/Math-BigInt/t/bare_mbf.t b/dist/Math-BigInt/t/bare_mbf.t index 7fb1ff0006..11b3222ea1 100644 --- a/dist/Math-BigInt/t/bare_mbf.t +++ b/dist/Math-BigInt/t/bare_mbf.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w use strict; -use Test::More tests => 2316; +use Test::More tests => 2319; BEGIN { unshift @INC, 't'; } |