Math-Round-SignificantFigures
view release on metacpan or search on metacpan
t/002_export_figs.t view on Meta::CPAN
use strict;
use warnings;
use Test::More tests => 9;
use Math::Round::SignificantFigures qw{:figs};
is(roundsigfigs(555.555, 1), 600);
is(ceilsigfigs(555.555, 1), 600);
is(floorsigfigs(555.555, 1), 500);
is(eval{roundsigdigs(555.555, 1)}, undef);
like($@, qr/Undefined subroutine/);
is(eval{floorsigdigs(555.555, 1)}, undef);
like($@, qr/Undefined subroutine/);
is(eval{ceilsigdigs(555.555, 1)}, undef);
like($@, qr/Undefined subroutine/);
( run in 1.153 second using v1.01-cache-2.11-cpan-71847e10f99 )