code: public static byte[] double_to_bytes(double d) {
  		long bits = Double.doubleToRawLongBits(d);
  		final byte[] b = new byte[8];
  		b[7] = (byte) (bits & 0xff);
  		bits >>= 8;
  		b[6] = (byte) (bits & 0xff);
  		bits >>= 8;
  		b[5] = (byte) (bits & 0xff);
  		bits >>= 8;
  		b[4] = (byte) (bits & 0xff);
  		bits >>= 8;
  		b[3] = (byte) (bits & 0xff);
  		bits >>= 8;
  		b[2] = (byte) (bits & 0xff);
  		bits >>= 8;
  		b[1] = (byte) (bits & 0xff);
  		bits >>= 8;
  		b[0] = (byte) (bits & 0xff);
  		return b;
  	}
docs: Convert a double to its 8-byte representation (big endian).