Which is the simplest way to check if two integers have same sign? Is there any short bitwise trick to do this?
Thinking back to my university days, in most machine representations, isn't the left-most bit of a integer a 1 when the number is negative, and 0 when it's positive?
I imagine this is rather machine-dependent, though.