in reply to optimizing the miller-rabin algorithm
I'm not sure I can help with your question. But you do say you are doing this in part to learn Perl, so I'll make a few (kindly meant) comments about your code.
First, always add use strict; use warnings; to your code. They will save you much grief and tearing of hair
Avoid C style for loops. For example replace
for (my $n=91001; $n<93000; $n++)with:
for my $n (91001..93000)Do not use $a and $b as general purpose variables. They are magical and are used in the context of sort.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: optimizing the miller-rabin algorithm
by punklrokk (Scribe) on May 16, 2006 at 01:57 UTC | |
by GrandFather (Saint) on May 16, 2006 at 02:09 UTC | |
by ikegami (Patriarch) on May 16, 2006 at 17:07 UTC |