3 ###############################################################################
12 unshift @INC, '../lib';
18 ###############################################################################
41 my ($x,$y) = split /:/;
43 ok (bigint::_constant("$x"),"$y");
46 ###############################################################################
49 my $x = 5; ok (ref($x) =~ /^Math::BigInt/); # :constant
51 # todo: ok (2 + 2.5,4.5); # should still work
52 # todo: $x = 2 + 3.5; ok (ref($x),'Math::BigFloat');
54 $x = 2 ** 255; ok (ref($x) =~ /^Math::BigInt/);
56 ok (12->bfac(),479001600);
59 ok (4.5+4.5,8); # truncate
60 ok (ref(4.5+4.5) =~ /^Math::BigInt/);
63 ###############################################################################
64 # accurarcy and precision
68 ok_undef ($Math::BigInt::accuracy);
69 ok_undef ($Math::BigInt::precision);
71 ok ($Math::BigInt::accuracy,5);
72 bigint->precision(-2);
73 ok_undef ($Math::BigInt::accuracy);
74 ok ($Math::BigInt::precision,-2);
76 ###############################################################################
77 ###############################################################################
78 # Perl 5.005 does not like ok ($x,undef)
84 ok (1,1) and return if !defined $x;