Re:Arithmetic Shifting Considered Harmful (1976) [pdf]
by Thorrez on Saturday April 25, 2020 @08:32PM
(#22983026)
> x / 2 resulting in the off-by-one error mentioned in the paper, if x is LLONG_MIN. LLONG_MIN / 2 = 0 in with their optimization.
Are you saying clang is leading to an off-by-one error? The code seems to behave correctly to me.
x / 2 resulting in the off-by-one error mentioned in the paper, if x is LLONG_MIN. LLONG_MIN / 2 = 0 in with their optimization.
https://godbolt.org/z/EtyNsR