You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BinaryInteger/entropy() as first appendix index? #154
Currently, the BinaryInteger/entropy() returns the number of bits needed to arbitrarily represent a binary integer. This number includes the appendix bit. In other words, it may return a value in the range 1...IX.max. In the limit of things, this is a bit awkward because IX.max+1 is a simpler cutoff point as it is a power of 2. Like, you can fit IX.max+1 bits exactly in an array of 8-bit elements. So it would perhaps be simpler if it instead returned the index of the first appendix bit (i.e. one less than the current value). Just a thought at this point.
Another observation is that the exclusive entropy definition, the number of ascending ones, and the number of descending zeros overflow at the same index in the following table. By contrast the inclusive entropy definition would overflow one index earlier (assuming the table continues to that point).
Activity
oscbyspro commentedon Dec 18, 2024
Another observation is that the exclusive entropy definition, the number of ascending ones, and the number of descending zeros overflow at the same index in the following table. By contrast the inclusive entropy definition would overflow one index earlier (assuming the table continues to that point).
........|01.......|011......|0111.....|01111....|011111...|0111111..|01111111.|011111111|0