Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
thrasumachos
· 5y ago · 0 comments
Nice that it even provides the right answer for negative numbers as undefined behavior but only when optimizations are enabled!
Comments
[–]
titzer
5y ago
Nice catch. One of many instances where C/C++ compilers rely on integer wraparound being UB.