should correctly generate @envelope, although there is no need for @dispersal anymore.my @dispersal; my $maxpow = int(log($cash)/log(2) - 1); @dispersal = map(2**$_, 0..$maxpow); $dispersal[$#dispersal+1] = $cash - 2**($maxpow +1)+1; my @envelope = sort { $a <=> $b } @dispersal;
In reply to Re: 1,000 bucks
by dailylemma
in thread 1,000 bucks
by idnopheq
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |