https://docs.oracle.com/javase/7/docs/api/java/lang/Double.html#longBitsToDouble(long)

If the argument is 0x7ff0000000000000L, the
result is positive infinity.

If the argument is 0xfff0000000000000L, the
result is negative infinity.

If the argument is any value in the range
0x7ff0000000000001L through 0x7fffffffffffffffL or
in the range 0xfff0000000000001L through
0xffffffffffffffffL, the result is a NaN. No IEEE
754 floating-point operation provided by Java can
distinguish between two NaN values of the same
type with different bit patterns. Distinct values
of NaN are only distinguishable by use of the
Double.doubleToRawLongBits method.

In all other cases, let s, e, and m be three
values that can be computed from the argument:

```
int s = ((bits >> 63) == 0) ? 1 :
-1;
int e = (int)((bits >> 52) & 0x7ffL);
long m = (e == 0) ?
(bits & 0xfffffffffffffL)
<< 1 :
(bits & 0xfffffffffffffL) |
0x10000000000000L;
```

Then the floating-point result equals the
value of the mathematical expression
s·m·2^{e-1075}.

The conversion can be done in reverse. For
"normal" numbers x, let `s`

be the sign
of the value, `e`

be floor(log2(x)) +
1075, and `m`

be rounded from
x/2^{e}, and shift the values
appropriately: `s`

is the high bit,
`e`

is the next 11 bits, `m`

is the remaining 52 bits.