Re:“Pack it in, mathematicians, someone owes LLVM a million ...
by vlovich123 on Thursday August 19, 2021 @09:59AM
(#28233904)
The snippet on Twitter uses unsigned.
Re:“Pack it in, mathematicians, someone owes LLVM a million ...
by stephencanon on Thursday August 19, 2021 @10:01AM
(#28233931)
Yes, it does.
This is an widely-held misconception, but C++ signed integers are _nothing_ like Z/nZ. Unsigned integers are (except for division), and machine arithmetic often is, but in the C++ abstract machine, signed overflow is undefined behavior.