App-SeqPericmd
view release on metacpan or search on metacpan
lib/App/SeqPericmd.pm view on Meta::CPAN
my $width_frac = max(
length($args{from} - int($args{from} )),
length($args{to} - int($args{to} )),
length($args{increment} - int($args{increment})),
) - 2;
$width_frac = 0 if $width_frac < 0;
$fmt = sprintf("%%0%d.%df",
$width_whole+$width_frac+($width_frac ? 1:0) + $neg,
$width_frac,
);
#say "D:fmt=$fmt";
} elsif ($args{from} != int($args{from}) ||
defined($args{to}) && $args{to} != int($args{to}) ||
$args{increment} || int($args{increment})) {
# use fixed floating point to avoid showing round-off errors
my $width_frac = max(
length($args{from} - int($args{from} )),
length($args{increment} - int($args{increment})),
(defined($args{to}) ?
(length($args{to}-int($args{to}))) : ()),
) - 2;
( run in 0.445 second using v1.01-cache-2.11-cpan-d7a12ab2c7f )