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

How exactly find out length of ADT vector in C which is type of uint64_t?

I am trying to find out how to find the length of an ADT array type of uint64_t in C. The code I wrote: char * uint64_t(char * uint64_t, const char *restrict sep); int size = sizeof(uint64_t) / sizeof(uint64_t[0]); printf("Size of vektor:", %zu, sizeof(uint64_t[0])); I am not able to change any variables because it is… Read More How exactly find out length of ADT vector in C which is type of uint64_t?