Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. int isAsciiDigit(int x) {
  2. int overflower = (1 << 31) ^ (~0x39);
  3. int overflowed = (x + overflower) >> 31;
  4. if (overflowed) {
  5. printf("Overflowed, so not an AsciiDigit.\n");
  6. }
  7. return !overflowed & !((x >> 4) ^ 3);
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement