Closed falk-hueffner closed 4 years ago
in bit-twiddling/all-higher-set.c, the function can be simplified:
int is_pattern(uint16_t x) { const uint16_t n = -x; return (n ^ x) < x; }
Thanks a lot! Will update soon. :)
Finally added. That's really clever, like it very much.
in bit-twiddling/all-higher-set.c, the function can be simplified: