public static String doubleToHex(double d) { byte[] out = new byte[8]; doubleToByteArray2(d, out, 0); return toHex(out); }