count of bits set in a long

David B.Anderson davea at quasar.wpd.sgi.com
Thu Sep 27 01:53:51 AEST 1990


In article <md.654260871 at achilles>, md at doc.ic.ac.uk (Mark Dawson) writes:
> In <3820 at goanna.cs.rmit.oz.au> ok at goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes:
> >There's a rather nice loop that does one iteration per bit, and works
> >for any size ...
> 
> Here it is:

See Harbison & Steele, C A Reference Manual,
first and second edition, Pages 174-176.

[ David B. Anderson  Silicon Graphics  (415)335-1548  davea at sgi.com ]
[``What can go wrong?''                          --Calvin and Hobbes]



More information about the Comp.lang.c mailing list