# How to turn a double to a 64-bit integer bit by bit using unions

I would like to store all bits of a double in a 64-bit integer in C. I.e. the most significant bit should be the sign, after that the exponent, then the fraction. I would like to use a union. >Solution : The safest way to do this is to use memcpy. double x = 123.456;… Read More How to turn a double to a 64-bit integer bit by bit using unions