I have an unsigned long long (or uint64_t) value and want to convert it to a double. The double shall have the same bit pattern as the long value. This way I can set the bits of the double "by hand".
unsigned long long bits = 1ULL;
double result = /* some magic here */ bits;
I am looking for a way to do this.