I don't know why the following casting in C++ gives different values
double n = -1.342;
cout << (uint64_t) n << endl;
cout << * (uint64_t *) &n << endl;
output:
18446744073709551615
13832094686727353926
Can someone please explain why different numbers are printed?