summaryrefslogtreecommitdiff
path: root/cpan/Math-BigInt-FastCalc
diff options
context:
space:
mode:
authorSteve Hay <steve.m.hay@googlemail.com>2018-07-03 12:13:44 +0100
committerSteve Hay <steve.m.hay@googlemail.com>2018-07-04 13:06:22 +0100
commit8c2a913217b49976911e8fb13834c833f3b2640e (patch)
treed5f7cbdb3451a5581b5445356664b606f6e2fb8e /cpan/Math-BigInt-FastCalc
parentb4d728a5afe53f52a81888fddcdc29c3db2d04f8 (diff)
downloadperl-8c2a913217b49976911e8fb13834c833f3b2640e.tar.gz
Upgrade Math::BigInt::FastCalc from version 0.5006 to 0.5007
Diffstat (limited to 'cpan/Math-BigInt-FastCalc')
-rw-r--r--cpan/Math-BigInt-FastCalc/lib/Math/BigInt/FastCalc.pm2
-rw-r--r--cpan/Math-BigInt-FastCalc/t/biglog.t2
-rw-r--r--cpan/Math-BigInt-FastCalc/t/bigroot.t23
3 files changed, 15 insertions, 12 deletions
diff --git a/cpan/Math-BigInt-FastCalc/lib/Math/BigInt/FastCalc.pm b/cpan/Math-BigInt-FastCalc/lib/Math/BigInt/FastCalc.pm
index 8d0ba4097a..3c85c6fc82 100644
--- a/cpan/Math-BigInt-FastCalc/lib/Math/BigInt/FastCalc.pm
+++ b/cpan/Math-BigInt-FastCalc/lib/Math/BigInt/FastCalc.pm
@@ -8,7 +8,7 @@ use Math::BigInt::Calc 1.999801;
our @ISA = qw< Math::BigInt::Calc >;
-our $VERSION = '0.5006';
+our $VERSION = '0.5007';
##############################################################################
# global constants, flags and accessory
diff --git a/cpan/Math-BigInt-FastCalc/t/biglog.t b/cpan/Math-BigInt-FastCalc/t/biglog.t
index 6c227e8e8a..7befc87c3d 100644
--- a/cpan/Math-BigInt-FastCalc/t/biglog.t
+++ b/cpan/Math-BigInt-FastCalc/t/biglog.t
@@ -4,7 +4,7 @@
# It is too slow to be simple included in bigfltpm.inc, where it would get
# executed 3 times. One time would be under Math::BigInt::BareCalc, which
-# shouldn't make any difference since there is no CALC->_log() function, and
+# shouldn't make any difference since there is no $LIB->_log() function, and
# one time under a subclass, which *should* work.
# But it is better to test the numerical functionality, instead of not testing
diff --git a/cpan/Math-BigInt-FastCalc/t/bigroot.t b/cpan/Math-BigInt-FastCalc/t/bigroot.t
index c14bca1e2a..076f02e7cb 100644
--- a/cpan/Math-BigInt-FastCalc/t/bigroot.t
+++ b/cpan/Math-BigInt-FastCalc/t/bigroot.t
@@ -11,7 +11,7 @@
use strict; # restrict unsafe constructs
use warnings; # enable optional warnings
-use Test::More tests => 4 * 2;
+use Test::More tests => 16;
use Math::BigFloat only => 'FastCalc';
use Math::BigInt;
@@ -22,15 +22,14 @@ my $mbi = "Math::BigInt";
# 2 ** 240 =
# 1766847064778384329583297500742918515827483896875618958121606201292619776
-# takes way too long
-#test_broot('2', '240', 8, undef,
-# '1073741824');
-#test_broot('2', '240', 9, undef,
-# '106528681.3099908308759836475139583940127');
-#test_broot('2', '120', 9, undef,
-# '10321.27324073880096577298929482324664787');
-#test_broot('2', '120', 17, undef,
-# '133.3268493632747279600707813049418888729');
+test_broot('2', '240', 8, undef,
+ '1073741824');
+test_broot('2', '240', 9, undef,
+ '106528681.3099908308759836475139583940127');
+test_broot('2', '120', 9, undef,
+ '10321.27324073880096577298929482324664787');
+test_broot('2', '120', 17, undef,
+ '133.3268493632747279600707813049418888729');
test_broot('2', '120', 8, undef,
'32768');
@@ -47,6 +46,10 @@ sub test_broot {
my $s = $scale || 'undef';
is($mbf->new($x)->bpow($n)->broot($y, $scale), $expected,
"Try: $mbf->new($x)->bpow($n)->broot($y, $s) == $expected");
+
+ # Math::BigInt returns the truncated integer part of the output, so remove
+ # the dot an anything after it before comparing.
+
$expected =~ s/\..*//;
is($mbi->new($x)->bpow($n)->broot($y, $scale), $expected,
"Try: $mbi->new($x)->bpow($n)->broot($y, $s) == $expected");