问题
I need to turn double into long preserving its binary structure, not number value. Just change type, but leave binary value as it is. Is there a native way to do it?
回答1:
There is Double with to doubleToLongBits and doubleToLongRawBits. Javadoc is your friend.
来源:https://stackoverflow.com/questions/15065869/double-to-long-without-conversion-in-java