in reply to Re^2: optimizing the miller-rabin algorithm
in thread optimizing the miller-rabin algorithm
Either use the C style for loop in that case or, if appropriate, do something like for ($start/2..$end/2) with $start and $end both even (but that's rather clunky!).
The Perl style for is very good for iterating over lists so you can do something like for (1.5, 2..4, @moreNumbers). Generally you should think Perl style for first, then C style if you really need it.
|
---|