|
|
|
|
|
by freshbob
2244 days ago
|
|
x >> 2 resulting in SAR is quite logical.
I'm more concerned about 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 |
|
Are you saying clang is leading to an off-by-one error? The code seems to behave correctly to me.