Enjoying the delightful absurdity of negating INT_MIN in a signed, 2s complement type. One is reminded of many weird wrinkles when debugging a superoptimizer.
-
Show this thread
-
Replying to @geofflangdale
Fun fact: x * -1 is not defined for all values of x.
1 reply 0 retweets 0 likes -
Replying to @lemire
Yes, the fact that we're heading into UB is fun, isn't it? I'm thinking at the assembly language level here so we're talking about the results of (say) calling PSIGNB with 0x80 as a value. Well defined in context, but still very weird and creates strange little wrinkles.
1 reply 0 retweets 0 likes -
Replying to @geofflangdale @lemire
my modest proposal to avoid this by adding an INT_NAN which uses the INT_MIN representation has been widely met with silence
5 replies 0 retweets 9 likes -
+1 Also, you'd like posits.
1 reply 0 retweets 0 likes
Btw, in posits it's called NaR (Not a Real) and I'm very proud because I came up with that name and the semantic and suggested it to John Gustafson back when posits were a new idea and there wasn't even a std yet.
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.