Path: utzoo!attcan!uunet!decwrl!sgi!davea@quasar.wpd.sgi.com From: davea@quasar.wpd.sgi.com (David B.Anderson) Newsgroups: comp.lang.c Subject: Re: count of bits set in a long Summary: H&S I, or H&S 2, page 175 . Keywords: bits set, count of, long Message-ID: <70335@sgi.sgi.com> Date: 26 Sep 90 15:53:51 GMT References: <37545@ut-emx.uucp> <3820@goanna.cs.rmit.oz.au> Sender: guest@sgi.sgi.com Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 12 In article , md@doc.ic.ac.uk (Mark Dawson) writes: > In <3820@goanna.cs.rmit.oz.au> ok@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@sgi.com ] [``What can go wrong?'' --Calvin and Hobbes]