}
print "# INC = @INC\n";
- plan tests => 50;
+ plan tests => 53;
}
use Math::BigFloat;
my $cl = "Math::BigFloat";
-# these tests are now really fast, since they collapse to blog(10), basically
+# These tests are now really fast, since they collapse to blog(10), basically
# Don't attempt to run them with older versions. You are warned.
# $x < 0 => NaN
# blog should handle bigint input
ok (Math::BigFloat::blog(Math::BigInt->new(100),10), 2);
+# some integer results
+ok ($cl->new(2)->bpow(32)->blog(2), '32'); # 2 ** 32
+ok ($cl->new(3)->bpow(32)->blog(3), '32'); # 3 ** 32
+ok ($cl->new(2)->bpow(65)->blog(2), '65'); # 2 ** 65
+
# test for bug in bsqrt() not taking negative _e into account
test_bpow ('200','0.5',10, '14.14213562');
test_bpow ('20','0.5',10, '4.472135955');
{
my ($x,$y,$scale,$result) = @_;
- print "# Tried: $x->bpow($y,$scale);\n"
+ print "# Tried: $x->bpow($y,$scale);\n"
unless ok ($cl->new($x)->bpow($y,$scale),$result);
}