4 ms·
But if you write a + b and the result is wrapped around or saturated, it's not integer addition. It's something else and should be written in another way in cod
by d_tr 2y ago
But if you write a + b and the result is wrapped around or saturated, it's not integer addition. It's something else and should be written in another way in code and have a different name. I am aware of modular arithmetic.
If you have a type named "int" with an operation called "addition", and that operation is not actually integer addition... it's wrong.