6

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?

user1748526
  • 464
  • 5
  • 18

1 Answers1

11

There is Double with to doubleToLongBits and doubleToLongRawBits. Javadoc is your friend.

Joop Eggen
  • 107,315
  • 7
  • 83
  • 138