more useful options | |
PerlMonks |
Re: Re: YAPNC: Yet another prime number checker?by nefertari (Chaplain) |
on Oct 09, 2002 at 07:32 UTC ( [id://203853]=note: print w/replies, xml ) | Need Help?? |
You can stop at sqrt($input). Example: and so on. So at 10 which is sqrt(10) you are at the point where the second factor is smaller than the first and you have already tested for this pair.
In Section
Seekers of Perl Wisdom
|
|