Given any number, for example 345.678 and -345.678, what I want is to convert 345.678 to 1 and -345.678 to -1. Basically I want to convert any number to 1 or -1 with the sign kept via bit-wise operator.
Although I don't know why, I can convert any number into -1 like this:
345.678 | -1
Any thoughts?