Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int isAsciiDigit(int x) {
- int overflower = (1 << 31) ^ (~0x39);
- int overflowed = (x + overflower) >> 31;
- if (overflowed) {
- printf("Overflowed, so not an AsciiDigit.\n");
- }
- return !overflowed & !((x >> 4) ^ 3);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement