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
unsigned long long
uint64_t
double
The following uses a void pointer.
unsigned long long bits = 1ULL; void* tempPtr=(void*)&bits; double result = *(double*)tempPtr;