summaryrefslogtreecommitdiff
path: root/lib/Math/BigInt/t/biglog.t
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Math/BigInt/t/biglog.t')
-rw-r--r--lib/Math/BigInt/t/biglog.t14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/Math/BigInt/t/biglog.t b/lib/Math/BigInt/t/biglog.t
index a3f2e62cac..6c99cb5535 100644
--- a/lib/Math/BigInt/t/biglog.t
+++ b/lib/Math/BigInt/t/biglog.t
@@ -37,7 +37,7 @@ BEGIN
}
print "# INC = @INC\n";
- plan tests => 66;
+ plan tests => 68;
}
use Math::BigFloat;
@@ -171,13 +171,23 @@ test_bpow ('9.86902225','0.5',undef, '3.1415');
test_bpow ('0.2','0.41',10, '0.5169187652');
#############################################################################
-# test bexp()
+# test bexp() with cached results
is ($cl->new(1)->bexp(), '2.718281828459045235360287471352662497757', 'bexp(1)');
is ($cl->new(2)->bexp(40), $cl->new(1)->bexp(45)->bpow(2,40), 'bexp(2)');
is ($cl->new("12.5")->bexp(61), $cl->new(1)->bexp(65)->bpow(12.5,61), 'bexp(12.5)');
+#############################################################################
+# test bexp() with big values (non-cached)
+
+is ($cl->new(1)->bexp(100),
+ '2.718281828459045235360287471352662497757247093699959574966967627724076630353547594571382178525166427',
+ 'bexp(100)');
+
+is ($cl->new("12.5")->bexp(91), $cl->new(1)->bexp(95)->bpow(12.5,91),
+ 'bexp(12.5) to 91 digits');
+
# all done
1;