xref: /openbsd-src/gnu/usr.bin/perl/cpan/Math-BigInt/t/big_pi_e.t (revision 3d61058aa5c692477b6d18acfbbdb653a9930ff9)
1# -*- mode: perl; -*-
2
3# Test bpi() and bexp()
4
5use strict;
6use warnings;
7
8use Test::More tests => 8;
9
10use Math::BigFloat;
11
12#############################################################################
13
14my $pi = Math::BigFloat::bpi();
15
16is($pi->{accuracy}, undef, 'A is not defined');
17is($pi->{precision}, undef, 'P is not defined');
18
19$pi = Math::BigFloat->bpi();
20
21is($pi->{accuracy}, undef, 'A is not defined');
22is($pi->{precision}, undef, 'P is not defined');
23
24$pi = Math::BigFloat->bpi(10);
25
26is($pi->{accuracy}, 10,    'A is defined');
27is($pi->{precision}, undef, 'P is not defined');
28
29#############################################################################
30
31my $e = Math::BigFloat->new(1)->bexp();
32
33is($e->{accuracy}, undef, 'A is not defined');
34is($e->{precision}, undef, 'P is not defined');
35