3 # Test bpi() and bexp()
11 # to locate the testing files
12 my $location = $0; $location =~ s/big_pi_e.t//i;
15 # testing with the core distribution
18 unshift @INC, '../lib';
23 unshift @INC, File::Spec->catdir(File::Spec->updir, $location);
27 unshift @INC, $location;
29 print "# INC = @INC\n";
36 #############################################################################
38 my $pi = Math::BigFloat::bpi();
40 ok (!exists $pi->{_a}, 'A not set');
41 ok (!exists $pi->{_p}, 'P not set');
43 $pi = Math::BigFloat->bpi();
45 ok (!exists $pi->{_a}, 'A not set');
46 ok (!exists $pi->{_p}, 'P not set');
48 $pi = Math::BigFloat->bpi(10);
50 is ($pi->{_a}, 10, 'A set');
51 is ($pi->{_p}, undef, 'P not set');
53 #############################################################################
54 my $e = Math::BigFloat->new(1)->bexp();
56 ok (!exists $e->{_a}, 'A not set');
57 ok (!exists $e->{_p}, 'P not set');