VC 如何用 long double
VC 如何用真的 80-位精度的 long double? 问题点数:20、回复次数:11Top
1 楼llf_hust()回复于 2006-03-25 23:03:38 得分 4
_int64Top
2 楼sankme(沧浪子)回复于 2006-03-25 23:26:00 得分 2
_int64Top
3 楼shenmea00000(学习中~~~)回复于 2006-03-26 00:38:52 得分 2
不明白什么意思~~~~Top
4 楼FengYuanMSFT((6.4 被封杀)袁峰 http://fengyuancom.spaces.live.com)回复于 2006-03-26 03:26:30 得分 0
Intel CPU 支持三种浮点树: 32-bit float, 64-bit double, 80-bit long double. 但 VC 不支持 80-bit long double.
有没有办法在 VC 下用 80-bit long double, 比如用 inline-assembly.Top
5 楼beepbug(放屁虫)回复于 2006-03-26 08:06:13 得分 2
intel的80位实数是CPU内部使用的,在计算实数时,先转换成80位,计算后再转换为原来的格式,目的是保证精度,因此称为临时实数。Top
6 楼FengYuanMSFT((6.4 被封杀)袁峰 http://fengyuancom.spaces.live.com)回复于 2006-03-26 09:26:37 得分 0
> Intel的80位实数是CPU内部使用的。
Wrong !
Intel CPU supports the loading, computation and saving or 80-bit long double. It's just that VC does not support long double. But may be there is a way to use long double using assembly code.
Top
7 楼ugg(逸学堂(exuetang.net))回复于 2006-03-26 10:02:44 得分 2
long longTop
8 楼strangerryf(白痴与白痴讨论的结果一定是比白痴更为白痴的结论)回复于 2006-03-26 10:21:45 得分 2
MSDN说
Previous 16-bit versions of Microsoft C/C++ and Microsoft Visual C++ supported the long double, 80-bit precision data type. In Win32 programming, however, the long double data type maps to the double, 64-bit precision data type. The Microsoft run-time library provides long double versions of the math functions only for backward compatibility. The long double function prototypes are identical to the prototypes for their double counterparts, except that the long double data type replaces the double data type. The long double versions of these functions should not be used in new code.
不应该在新代码中使用long double!Top
9 楼scutcs(做人一定要厚道)回复于 2006-03-26 11:39:04 得分 2
袁老大,去给我看帖啊.
http://community.csdn.net/Expert/topic/4640/4640325.xml?temp=.7130243
要不你再在这里发一帖深入讨论一下自增自减也行,这种问题总有种防不胜防的感觉.Top
10 楼zengkun100(夜的孩子)回复于 2006-03-26 11:52:31 得分 2
个人觉得要用高精度的浮点数不要用VC++提供的库,INTEL好像有高精度的浮点库Top
11 楼xyq1986(综艺一哥)回复于 2006-03-26 23:23:31 得分 2
long long 在VC6.0下是不行的,在.net下就可以Top




