摘要: 参考:float和double类型的内存分布和比较方法收藏 Comparing floating point numbers总结几点:0. float占4byte,精度是6~7位;double占8byte,精度是15~16位。 1. C/C++的浮点数据类型有float和double两种。它们在内存中是以科学计数法的结果来存储的。 类型float大小为4字节,即32位,内存中的存储方式如下: 符号位(1 bit) 指数(8 bit) 尾数(23 bit) 类型double大小为8字节,即64位,内存布局如下: 符号位(1 bit) 指数(11 bit) 尾数(52 bit) 符号位决定浮点数的 阅读全文
posted @ 2011-03-11 14:11 能巴 阅读(6801) 评论(0) 推荐(0) 编辑
摘要: Yes, you can build x86 + x64 version of your VS solution in parallel.Steps:1. open your solution to build as debug + x86. No writing to any files, just building.2. open your solution to build as debug + x64. VS now will prompt you to choose another place to store the temp intellisense database (sdf 阅读全文
posted @ 2011-03-11 10:48 能巴 阅读(192) 评论(0) 推荐(0) 编辑
摘要: One of my c# project refers to a COM module. When I built it on my new machine installed with Win7 x64, it failed to compile correctly. With diagnosis, found out the cause: the com module failed to be registered into Reg (regsvr32 /s xx.dll). I turned off UAC, but still got failure.. until making a 阅读全文
posted @ 2011-03-11 10:22 能巴 阅读(200) 评论(0) 推荐(0) 编辑