in reply to Simple primality testing
sub is_prime (Int $n) { $n % all(2 .. sqrt($n)+1); }
Credit: Autrijus in the Apocalypse Now talk.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Simple primality testing
by ambrus (Abbot) on Nov 22, 2005 at 21:32 UTC | |
by gaal (Parson) on Nov 23, 2005 at 06:13 UTC | |
|
Re^2: Simple primality testing
by gu (Beadle) on Nov 27, 2005 at 22:12 UTC |