Surprisingly useful little identity: if a, b, c >= 0, then saturate(a + b - c) = saturate(saturate(a + saturate(b - c)) - saturate(c - b)) where saturate(x) = min(max(x, 0), k) for some real k >= 0
Hm? When (x&mask) == 0, then pext(x, mask) will also be 0, and pdep(0+1, mask) will just be the first set bit in mask, no?
-
-
Typo: when (x&~mask)==0.
-
Ah. That makes more sense.
End of conversation
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.