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