10 unshift @INC, '../lib'; # for running manually
14 for (1..7) { skip (1,'Not supported on older Perls'); }
19 use Math::BigInt ':constant';
21 ok (2 ** 255,'57896044618658097711785492504343953926634992332820282019728792003956564819968');
24 local $^W = 0; # protect against "non-portable" warnings
25 # hexadecimal constants
26 ok (0x123456789012345678901234567890,
27 Math::BigInt->new('0x123456789012345678901234567890'));
29 ok (0b01010100011001010110110001110011010010010110000101101101,
31 '0b01010100011001010110110001110011010010010110000101101101'));
34 use Math::BigFloat ':constant';
35 ok (1.0 / 3.0, '0.3333333333333333333333333333333333333333');
37 # stress-test Math::BigFloat->import()
39 Math::BigFloat->import( qw/:constant/ );
42 Math::BigFloat->import( qw/:constant upgrade Math::BigRat/ );
45 Math::BigFloat->import( qw/upgrade Math::BigRat :constant/ );