开发者

double to hex. How It's Made?

开发者 https://www.devze.com 2022-12-24 14:26 出处:网络
157,开发者_如何学Go453796 = hex 18068A 157,455093 = hex 180697 71,5037= hex E91D00 71,506104= hex E93500

157,开发者_如何学Go453796 = hex 18068A

157,455093 = hex 180697

71,5037 = hex E91D00

71,506104 = hex E93500

71,507103 = hex E93F00

0 = hex 000000

I know exactly what it is not IEEE 754


The following depends on the byte-order of your processor architecture and thus can't be read back on every system:

double f = 10020.2093;
char acz[sizeof(double)+1] = '\0';
std::copy((char*)(&f), ((char*)&f)+sizeof(double), acz);
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号