in reply to Re: Ceiling elements of an array!
in thread Ceiling elements of an array!
Ah, I think you're right -- with that light now on, re-reading the OP it makes perfect sense. I guess my intuition circuit is operating in low-power mode today.
Curious why you'd go through the effort of loading POSIXjust to get at ceiling()when, in this context, it's always going to be non-negative numbers and the effect can simply be calculated?
Other than, of course, that the OP did specifically request it . . .
my $eltcnt = @datary; my $dspcnt = int(($eltcnt + 0.5) / 2);
Which could likely be reduced to a single, harder-to-read line of code.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Ceiling elements of an array!
by AnomalousMonk (Archbishop) on May 06, 2015 at 22:48 UTC | |
|
Re^3: Ceiling elements of an array!
by GotToBTru (Prior) on May 06, 2015 at 18:13 UTC |