bool is_multiple_of_3(unsigned x) { unsigned y; do { y = 0; while (x) { y += x & 3; x >>= 2; } x = y; } while (y > 5); return y == 3; }
-
-
@solardiz@ch3root For non-constant n, you can also precompute the parameters and do it yourself. See http://ridiculousfish.com/blog/posts/labor-of-division-episode-iii.html … -
-
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.