System.out.println(Double.toHexString(-1d));
yields
-0x1.0p0
The Javadoc explains the syntax as:
If m is a double value with a normalized representation, substrings are used to represent the significand and exponent fields. The significand is represented by the characters "0x1." followed by a lowercase hexadecimal representation of the rest of the significand as a fraction. Trailing zeros in the hexadecimal representation are removed unless all the digits are zero, in which case a single zero is used. Next, the exponent is represented by "p" followed by a decimal string of the unbiased exponent as if produced by a call to Integer.toString on the exponent value.
This is the first time I see these "-0x1." notations. It it some industry standard, or Java's innovation?
It's not just java, it looks like it's this way in C too, this page explains it some: http://www.exploringbinary.com/hexadecimal-floating-point-constants/
Since the hex number is representing a double, it's represented in scientific notation, so what you are seeing is 1.0 to the power of 0. The thing is that the toHexString method is first looking at the binary string, and the translating any portion after the '.' to hex. This means that the digit before the period will always be a 1, hence the reason for the javadoc talking about "0x1" as the notation describing the number as hex. The '-' is just saying it's negative, it's not part of the notation.