I’m not exactly sure where that snippet comes from, but I believe those values are forced into integers. The probably have decimals because they were produced by swarming years ago honestly.
Remember that this encoder is going to play a part in a larger encoding. To know if w
is too large within n
, you really need to know the combined n
and how much space the sub-encoding takes up.
Also, check out this cyclic encoder display I’m working on (not sure how long that link will be valid). In this viz, n
= bits
and w
= range
. I’m going to try and explain the concept of buckets with this visual soon.