Talk:Pernicious numbers

From Rosetta Code
Revision as of 14:43, 12 March 2014 by Grondilu (talk | contribs) (About the C solution)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

C solution too cryptic?

Hi, the C solution is a bit mysterious to me. The for loop seems to "remove the zeros" as I understand correctly, but then what's so special about 2693408940 ?? How can a simple bitwise & tell if the number of 1 (which is now the length since all zeros have been removed) is prime? A bit of explanation in the introduction of the section or in comment would be welcome--Grondilu (talk) 14:43, 12 March 2014 (UTC)