Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

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?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (16)
As of 2016-02-11 17:24 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (376 votes), past polls