Hacker News new | ask | show | jobs
by Wiseacre 1570 days ago
and an int overflow!
1 comments

Unless they are unsigned ints, and then it is defined behaviour and it becomes modulo arithmetic.
Thank 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.