Talk:Population count: Difference between revisions

added a vertical histogram (histograph) of the integers 0──►256.
(→‎task requirements change: I found the way to highlight a draft task that may need review by example authors.)
(added a vertical histogram (histograph) of the integers 0──►256.)
 
Line 16:
 
:: The form (list the numbers on one line as opposed to a vertical list) was asked for to more easily see the commonality of the three sets of outputs, thus, using a common format.   Since it is trivial for most computer languages to show each set on a single line, I didn't think it was unreasonable to have that as a requirement.   It wasn't the sole reason, but simply a matter of visual convenience.   In the task, ''population count'' was described in the first sentence (and I'll make that even clearer forthwith), and should clearly identify the reference.   ''Hamming weight'' has other uses, and for the binary case, it would be then equivalent to a ''popcount''. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 23:13, 19 March 2014 (UTC)
 
 
== a vertical histogram/histograph ==
 
The vertical histogram/histograph   (shown below)   illustrates the   ''population count''   of the integers   '''0 ──► 256''':
 
(Shown at three-quarter size.)
<pre style="font-size:75%>
■ ■ ■ ■ ■ ■ ■■│
│ │ │ │ │ │ │││
│ │ │ │ │ │ │││
│ │ │ │ │ │ │││
│ │ │ │ │ │ │││
■ ■ ■ ■ ■ ■■│ ■ ■ ■ ■ ■■│ ■ ■ ■ ■■│ ■ ■ ■■│ ■ ■■│ ■■│■│││
│ │ │ │ │ │││ │ │ │ │ │││ │ │ │ │││ │ │ │││ │ │││ │││││││
│ │ │ │ │ │││ │ │ │ │ │││ │ │ │ │││ │ │ │││ │ │││ │││││││
│ │ │ │ │ │││ │ │ │ │ │││ │ │ │ │││ │ │ │││ │ │││ │││││││
│ │ │ │ │ │││ │ │ │ │ │││ │ │ │ │││ │ │ │││ │ │││ │││││││
■ ■ ■ ■ ■■│ ■ ■ ■ ■■│ ■ ■ ■■│ ■ ■■│ ■■│■│││ ■ ■ ■ ■■│ ■ ■ ■■│ ■ ■■│ ■■│■│││ ■ ■ ■■│ ■ ■■│ ■■│■│││ ■ ■■│ ■■│■│││ ■■│■│││■│││││││
│ │ │ │ │││ │ │ │ │││ │ │ │││ │ │││ │││││││ │ │ │ │││ │ │ │││ │ │││ │││││││ │ │ │││ │ │││ │││││││ │ │││ │││││││ │││││││││││││││
│ │ │ │ │││ │ │ │ │││ │ │ │││ │ │││ │││││││ │ │ │ │││ │ │ │││ │ │││ │││││││ │ │ │││ │ │││ │││││││ │ │││ │││││││ │││││││││││││││
│ │ │ │ │││ │ │ │ │││ │ │ │││ │ │││ │││││││ │ │ │ │││ │ │ │││ │ │││ │││││││ │ │ │││ │ │││ │││││││ │ │││ │││││││ │││││││││││││││
│ │ │ │ │││ │ │ │ │││ │ │ │││ │ │││ │││││││ │ │ │ │││ │ │ │││ │ │││ │││││││ │ │ │││ │ │││ │││││││ │ │││ │││││││ │││││││││││││││
│ │ │ │ │││ │ │ │ │││ │ │ │││ │ │││ │││││││ │ │ │ │││ │ │ │││ │ │││ │││││││ │ │ │││ │ │││ │││││││ │ │││ │││││││ │││││││││││││││
■ ■ ■ ■■│ ■ ■ ■■│ ■ ■■│ ■■│■│││ ■ ■ ■■│ ■ ■■│ ■■│■│││ ■ ■■│ ■■│■│││ ■■│■│││■│││││││ ■ ■ ■■│ ■ ■■│ ■■│■│││ ■ ■■│ ■■│■│││ ■■│■│││■│││││││ ■ ■■│ ■■│■│││ ■■│■│││■│││││││ ■■│■│││■│││││││■│││││││││││││││
│ │ │ │││ │ │ │││ │ │││ │││││││ │ │ │││ │ │││ │││││││ │ │││ │││││││ │││││││││││││││ │ │ │││ │ │││ │││││││ │ │││ │││││││ │││││││││││││││ │ │││ │││││││ │││││││││││││││ │││││││││││││││││││││││││││││││
│ │ │ │││ │ │ │││ │ │││ │││││││ │ │ │││ │ │││ │││││││ │ │││ │││││││ │││││││││││││││ │ │ │││ │ │││ │││││││ │ │││ │││││││ │││││││││││││││ │ │││ │││││││ │││││││││││││││ │││││││││││││││││││││││││││││││
│ │ │ │││ │ │ │││ │ │││ │││││││ │ │ │││ │ │││ │││││││ │ │││ │││││││ │││││││││││││││ │ │ │││ │ │││ │││││││ │ │││ │││││││ │││││││││││││││ │ │││ │││││││ │││││││││││││││ │││││││││││││││││││││││││││││││
│ │ │ │││ │ │ │││ │ │││ │││││││ │ │ │││ │ │││ │││││││ │ │││ │││││││ │││││││││││││││ │ │ │││ │ │││ │││││││ │ │││ │││││││ │││││││││││││││ │ │││ │││││││ │││││││││││││││ │││││││││││││││││││││││││││││││
■ ■ ■■│ ■ ■■│ ■■│■│││ ■ ■■│ ■■│■│││ ■■│■│││■│││││││ ■ ■■│ ■■│■│││ ■■│■│││■│││││││ ■■│■│││■│││││││■│││││││││││││││ ■ ■■│ ■■│■│││ ■■│■│││■│││││││ ■■│■│││■│││││││■│││││││││││││││ ■■│■│││■│││││││■│││││││││││││││■│││││││││││││││││││││││││││││││
│ │ │││ │ │││ │││││││ │ │││ │││││││ │││││││││││││││ │ │││ │││││││ │││││││││││││││ │││││││││││││││││││││││││││││││ │ │││ │││││││ │││││││││││││││ │││││││││││││││││││││││││││││││ │││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││
│ │ │││ │ │││ │││││││ │ │││ │││││││ │││││││││││││││ │ │││ │││││││ │││││││││││││││ │││││││││││││││││││││││││││││││ │ │││ │││││││ │││││││││││││││ │││││││││││││││││││││││││││││││ │││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││
│ │ │││ │ │││ │││││││ │ │││ │││││││ │││││││││││││││ │ │││ │││││││ │││││││││││││││ │││││││││││││││││││││││││││││││ │ │││ │││││││ │││││││││││││││ │││││││││││││││││││││││││││││││ │││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││
│ │ │││ │ │││ │││││││ │ │││ │││││││ │││││││││││││││ │ │││ │││││││ │││││││││││││││ │││││││││││││││││││││││││││││││ │ │││ │││││││ │││││││││││││││ │││││││││││││││││││││││││││││││ │││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││
■ ■■│ ■■│■│││ ■■│■│││■│││││││ ■■│■│││■│││││││■│││││││││││││││ ■■│■│││■│││││││■│││││││││││││││■│││││││││││││││││││││││││││││││ ■■│■│││■│││││││■│││││││││││││││■│││││││││││││││││││││││││││││││■│││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││
│ │││ │││││││ │││││││││││││││ │││││││││││││││││││││││││││││││ │││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││ │││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││
│ │││ │││││││ │││││││││││││││ │││││││││││││││││││││││││││││││ │││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││ │││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││
│ │││ │││││││ │││││││││││││││ │││││││││││││││││││││││││││││││ │││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││ │││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││
│ │││ │││││││ │││││││││││││││ │││││││││││││││││││││││││││││││ │││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││ │││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││
■■│■│││■│││││││■│││││││││││││││■│││││││││││││││││││││││││││││││■│││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││■│││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││■
││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││
││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││
││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││
─┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴
01121223122323341223233423343445122323342334344523343445344545561223233423343445233434453445455623343445344545563445455645565667122323342334344523343445344545562334344534454556344545564556566723343445344545563445455645565667344545564556566745565667566767781
</pre>