Skip to main content
5 events
when toggle format what by license comment
Oct 15, 2022 at 9:37 comment added Dwayne Robinson "Incidentally this is the same as N*0xff/0x1f" Note it differs for values {3,7,24,28} which yield {24,57,198,231} with bit replication but {25,58,197,230} for round(N*255/31). All other values are the same (using floor or ceil instead of causes more error). So, it's a quite close approximation. However floor(N*33/4) does exactly match for all N with bit replication.
Oct 25, 2018 at 9:33 history edited PaulHK CC BY-SA 4.0
added 50 characters in body
Oct 25, 2018 at 2:11 history edited PaulHK CC BY-SA 4.0
edited body
Oct 25, 2018 at 2:10 vote accept wip
Oct 25, 2018 at 2:03 history answered PaulHK CC BY-SA 4.0