Primality by trial division: Difference between revisions

Content added Content deleted
No edit summary
(Added PicoLisp)
Line 536: Line 536:
}
}
?></lang>
?></lang>

=={{header|PicoLisp}}==
<lang PicoLisp>(de prime? (N)
(or
(= N 2)
(and
(> N 1)
(bit? 1 N)
(for (D 3 T (+ D 2))
(T (> D (sqrt N)) T)
(T (=0 (% N D)) NIL) ) ) ) )</lang>


=={{header|PowerShell}}==
=={{header|PowerShell}}==