summaryrefslogtreecommitdiff
path: root/lib/Math/BigInt
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Math/BigInt')
-rw-r--r--lib/Math/BigInt/Calc.pm4
-rw-r--r--lib/Math/BigInt/t/biglog.t4
-rw-r--r--lib/Math/BigInt/t/mbimbf.t10
3 files changed, 12 insertions, 6 deletions
diff --git a/lib/Math/BigInt/Calc.pm b/lib/Math/BigInt/Calc.pm
index b1d88fa887..a3091c75c8 100644
--- a/lib/Math/BigInt/Calc.pm
+++ b/lib/Math/BigInt/Calc.pm
@@ -8,7 +8,7 @@ require Exporter;
use vars qw/@ISA $VERSION/;
@ISA = qw(Exporter);
-$VERSION = '0.34';
+$VERSION = '0.35';
# Package to store unsigned big integers in decimal and do math with them
@@ -27,7 +27,7 @@ $VERSION = '0.34';
# Beware of things like:
# $i = $i * $y + $car; $car = int($i / $MBASE); $i = $i % $MBASE;
-# This works on x86, but fails on ARM (SA1100, iPAQ) due to whoeknows what
+# This works on x86, but fails on ARM (SA1100, iPAQ) due to whoknows what
# reasons. So, use this instead (slower, but correct):
# $i = $i * $y + $car; $car = int($i / $MBASE); $i -= $MBASE * $car;
diff --git a/lib/Math/BigInt/t/biglog.t b/lib/Math/BigInt/t/biglog.t
index e79a5d2518..c7c07c108f 100644
--- a/lib/Math/BigInt/t/biglog.t
+++ b/lib/Math/BigInt/t/biglog.t
@@ -96,9 +96,7 @@ ok ($cl->new('1.2')->bpow('0.3',10), '1.056219968');
ok ($cl->new('10')->bpow('0.6',10), '3.981071706');
# blog should handle bigint input
-# TODO: should be 2
-#ok (Math::BigFloat::blog(Math::BigInt->new(100),10), 2);
-ok (Math::BigFloat::blog(Math::BigInt->new(100),10), 'NaN');
+ok (Math::BigFloat::blog(Math::BigInt->new(100),10), 2);
ok (Math::BigInt->new(100)->blog(10), 'NaN');
# test for bug in bsqrt() not taking negative _e into account
diff --git a/lib/Math/BigInt/t/mbimbf.t b/lib/Math/BigInt/t/mbimbf.t
index bada2aade0..17cd712b0f 100644
--- a/lib/Math/BigInt/t/mbimbf.t
+++ b/lib/Math/BigInt/t/mbimbf.t
@@ -32,7 +32,7 @@ BEGIN
print "# INC = @INC\n";
plan tests => 679
- + 22; # own tests
+ + 23; # own tests
}
use Math::BigInt 1.63;
@@ -92,4 +92,12 @@ foreach my $class (qw/Math::BigInt Math::BigFloat/)
# so the return value of that operation should
# be 42, not undef
ok ($x->accuracy(),42); # so $x should still have A = 42
+ $class->accuracy(undef); # reset for further tests
+ $class->precision(undef);
}
+
+# bug with flog(Math::BigFloat,Math::BigInt)
+$x = Math::BigFloat->new(100);
+$x = $x->blog(Math::BigInt->new(10));
+
+ok ($x,2);