Pernicious numbers: Difference between revisions
m
Forth - simpler primality test
(Added Forth solution) |
m (Forth - simpler primality test) |
||
Line 864:
0
begin
n 0
while
n n 1- and to n
Line 870:
repeat ;
\ primality test for 0 <= n <= 63
: prime?
1 swap lshift 0x28208a20a08a28ac and 0<> ;
: pernicious? ( n -- ? )
|