4 ms·
saving (one) swap space by adding 3 reads and 3 calculations.
by pickledcods 5y ago
saving (one) swap space by adding 3 reads and 3 calculations.
- Wiseacre 5y agoand an int overflow!
- pickledcods 5y agoUnless they are unsigned ints, and then it is defined behaviour and it becomes modulo arithmetic.
- mjevans 5y agoThank you, I'd forgotten and remembered and forgotten that again. In a sort of ironic comedy, maybe an msint.h file could include definitions such as: mint8, sint8, ... mint64, sint64, etc. As well as an explanation about the difference between modular and signed (2s compliment) arithmetic operations.