On 3/27/23 20:06, Song Gao wrote:
+#define DO_CLO_B(N)  (clz32((uint8_t)~N) - 24)
+#define DO_CLO_H(N)  (clz32((uint16_t)~N) - 16)

I think this is wrong. You *want* the high bits to be set, so that they are ones, and included in the count, which you then subtract off. You want the "real" count to start after the 24th leading 1.


r~

Reply via email to