Pernicious numbers: Difference between revisions

m
→‎{{header|Phix}}: is_prime() now builtin
m (Fix Perl 6 -> Raku in comments)
m (→‎{{header|Phix}}: is_prime() now builtin)
Line 1,655:
 
=={{header|Phix}}==
<lang Phix>function is_primepernicious(atominteger n)
if n<2 then return false end if
for i=2 to floor(sqrt(n)) do
if mod(n,i)=0 then return false end if
end for
return true
end function
 
function pernicious(integer n)
return is_prime(sum(int_to_bits(n,32)))
end function
7,796

edits