Lines Matching refs:ok
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/);
29 ok (1/3, '1/3');
30 ok (1/4+1/3,'7/12');
31 ok (5/7+3/7,'8/7');
33 ok (3/7+1,'10/7');
34 ok (3/7+1.1,'107/70');
35 ok (3/7+3/7,'6/7');
37 ok (3/7-1,'-4/7');
38 ok (3/7-1.1,'-47/70');
39 ok (3/7-2/7,'1/7');
42 # ok (1+3/7,'10/7');
44 ok (1.1+3/7,'107/70');
45 ok (3/7*5/7,'15/49');
46 ok (3/7 / (5/7),'3/5');
47 ok (3/7 / 1,'3/7');
48 ok (3/7 / 1.5,'2/7');
54 ok (bigrat->accuracy(12),12);
55 ok (bigrat->accuracy(),12);
58 ok (bigrat->precision(12),12);
59 ok (bigrat->precision(),12);
61 ok (bigrat->round_mode(),'even');
62 ok (bigrat->round_mode('odd'),'odd');
63 ok (bigrat->round_mode(),'odd');
67 # Perl 5.005 does not like ok ($x,undef)
73 ok (1,1) and return if !defined $x;
74 ok ($x,'undef');