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
-
Show this thread
-
Replying to @rygorous
I need to enslave you and bolt you to the side of Z3 as a useful "theory". Interesting stuff!
0 replies 0 retweets 0 likes -
This Tweet is unavailable.
-
Replying to @johnregehr @geofflangdale
If you want to pick one of my weird identities to remember, make it this one: if (x&mask)==0, then _pdep_u64(_pext_u64(x, mask) + 1, mask) == ((x - mask) & mask) [I explain this in https://fgiesen.wordpress.com/2011/01/17/texture-tiling-and-swizzling/ …]
2 replies 1 retweet 6 likes -
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?
1 reply 0 retweets 0 likes -
Typo: when (x&~mask)==0.
2 replies 0 retweets 2 likes
Ah. That makes more sense. 
2:48 AM - 11 Oct 2018
0 replies
0 retweets
0 likes
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.