#include<cstdio>
#include<algorithm>
#include<iostream>
using namespace std;
union foo
{
unsigned char s[8];
double b;
};
int main()
{
foo fo;
fo.b=0.5;
unsigned _int64 *t=(unsigned _int64*)&fo.b;
int hard=(*t)>>52;
printf("%0x\n",hard);
printf("%d\n",hard);
}
IEEE754标准!http://baike.baidu.com/link?url=Py_O8ueRz4Thl24Iz9PgM-8EhOS5uUJ9f4qz3N-ZeSMIfmE4u4BDRBhg0LOWH-t0oFv0EXvsgodBkcTmoyC4Pq
对内存和数据的表示认识更加深刻!