2 of 2 smaller constants

C - 4 tokens

int div3(int x) {
return ((x * 43) >> 7) * 3 == x;
}


Works up to 383.

Previous version (bigger constants):

int div3(int x) {
return ((x * 171) >> 9) * 3 == x;
}


Works up to 1535