summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/cpan/Math-BigInt/t/const_mbf.t
blob: 37524a357be54830e3f390613f5d610d9b766106 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!perl

# test Math::BigFloat constants alone (w/o Math::BigInt loading)

use strict;
use warnings;

use Test::More tests => 2;

use Math::BigFloat ':constant';

is(1.0 / 3.0, '0.3333333333333333333333333333333333333333',
   "1.0 / 3.0 = 0.3333333333333333333333333333333333333333");

# Math::BigInt was not loaded with ':constant', so only floats are handled
is(ref(2 ** 2), '', "2 ** 2 is a scalar");