Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Just another Perl shrine
 
PerlMonks  

Re^2: a close prime number

by Roy Johnson (Monsignor)
on Feb 11, 2005 at 23:34 UTC ( #430348=note: print w/ replies, xml ) Need Help??


in reply to Re: a close prime number
in thread a close prime number

One other bug:

for (@primes) { last if $_ > $root; # If you have checked bigger primes, +you don't want to go through all of them! print("$_ divides $num\n"), return 0 if ($num % $_ == 0); }

Caution: Contents may have been coded under pressure.


Comment on Re^2: a close prime number
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://430348]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2014-04-20 13:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls