3 ###############################################################################
12 unshift @INC, '../lib';
18 ###############################################################################
21 my $x = 5; ok (ref($x) =~ /^Math::BigInt/); # :constant
23 # todo: ok (2 + 2.5,4.5); # should still work
24 # todo: $x = 2 + 3.5; ok (ref($x),'Math::BigFloat');
26 $x = 2 ** 255; ok (ref($x) =~ /^Math::BigInt/);
28 # see if Math::BigRat constant works
34 ok (3/7+1.1,'107/70');
38 ok (3/7-1.1,'-47/70');
44 ok (1.1+3/7,'107/70');
46 ok (3/7 / (5/7),'3/5');
50 ###############################################################################
51 # accurarcy and precision
54 #ok_undef ($Math::BigInt::accuracy);
55 #ok_undef ($Math::BigInt::precision);
56 #ok_undef ($Math::BigFloat::accuracy);
57 #ok_undef ($Math::BigFloat::precision);
59 #ok ($Math::BigInt::accuracy,5);
60 #ok ($Math::BigFloat::accuracy,5);
61 #bigrat->precision(-2);
62 #ok_undef ($Math::BigInt::accuracy);
63 #ok_undef ($Math::BigFloat::accuracy);
64 #ok ($Math::BigInt::precision,-2);
65 #ok ($Math::BigFloat::precision,-2);
67 ###############################################################################
68 ###############################################################################
69 # Perl 5.005 does not like ok ($x,undef)
75 ok (1,1) and return if !defined $x;