P is for Practical | |
PerlMonks |
Re: Prime Number Finderby Cybercosis (Monk) |
on Feb 07, 2002 at 09:09 UTC ( [id://143821]=note: print w/replies, xml ) | Need Help?? |
Eep! The brute-force approach! Well, if you must, you might as well cut calculation time somewhat: -You only have to check the numbers up to one-half of the number you are testing, because the second half are multiplied by the first half to get the number. -Multiples of numbers that you've already checked can be skipped. ~Cybercosis nemo accipere quod non merere
In Section
Cool Uses for Perl
|
|