C语言网

 找回密码
 加入社区!

QQ登录

只需一步,快速开始

查看: 339|回复: 1

float.h [复制链接]

Rank: 1

主题
0
帖子
17
C币
9 枚
在线时间
3 小时
发表于 2010-4-19 13:13:17 |显示全部楼层
1C币
float.h中的它们都代表什么意思啊,特别是大写字母的解释
#define _MCW_EM  0x0008001F /* Error masks */
#define _MCW_IC  0x00040000 /* Infinity */
#define _MCW_RC  0x00000300 /* Rounding */
#define _MCW_PC  0x00030000 /* Precision */

#define _EM_INVALID 0x00000010
#define _EM_DENORMAL 0x00080000
#define _EM_ZERODIVIDE 0x00000008
#define _EM_OVERFLOW 0x00000004
#define _EM_UNDERFLOW 0x00000002
#define _EM_INEXACT 0x00000001
#define _IC_AFFINE 0x00040000
#define _IC_PROJECTIVE 0x00000000
#define _RC_CHOP 0x00000300
#define _RC_UP  0x00000200
#define _RC_DOWN 0x00000100
#define _RC_NEAR 0x00000000
#define _PC_24  0x00020000
#define _PC_53  0x00010000
#define _PC_64  0x00000000

#define _FPCLASS_SNAN 0x0001 /* Signaling "Not a Number" */
#define _FPCLASS_QNAN 0x0002 /* Quiet "Not a Number" */
#define _FPCLASS_NINF 0x0004 /* Negative Infinity */
#define _FPCLASS_NN 0x0008 /* Negative Normal */
#define _FPCLASS_ND 0x0010 /* Negative Denormal */
#define _FPCLASS_NZ 0x0020 /* Negative Zero */
#define _FPCLASS_PZ 0x0040 /* Positive Zero */
#define _FPCLASS_PD 0x0080 /* Positive Denormal */
#define _FPCLASS_PN 0x0100 /* Positive Normal */
#define _FPCLASS_PINF 0x0200 /* Positive Infinity */

#define _SW_UNEMULATED  0x0040  /* unemulated instruction */
#define _SW_SQRTNEG  0x0080  /* square root of a neg number */
#define _SW_STACKOVERFLOW 0x0200  /* FP stack overflow */
#define _SW_STACKUNDERFLOW 0x0400  /* FP stack underflow */
#define _FPE_INVALID  0x81
#define _FPE_DENORMAL  0x82
#define _FPE_ZERODIVIDE  0x83
#define _FPE_OVERFLOW  0x84
#define _FPE_UNDERFLOW  0x85
#define _FPE_INEXACT  0x86
#define _FPE_UNEMULATED  0x87
#define _FPE_SQRTNEG  0x88
#define _FPE_STACKOVERFLOW 0x8a
#define _FPE_STACKUNDERFLOW 0x8b
#define _FPE_EXPLICITGEN 0x8c    /* raise( SIGFPE ); */

Rank: 1

主题
1
帖子
9
C币
8 枚
在线时间
2 小时
发表于 2011-2-20 20:57:45 |显示全部楼层
可以用一个字节表示不同的状态组合
比如
#define _FPCLASS_SNAN 0x0001 /* Signaling "Not a Number" */
#define _FPCLASS_QNAN 0x0002 /* Quiet "Not a Number" */
换成二进制就是 A: 0001 B:0010  C=A|B=0011 用0011表示一个状态 检测其中包含的A 属性就用C&A
您需要登录后才可以回帖 登录 | 加入社区!

C语言 ( 粤ICP备11042647号-2 )

GMT+8, 2012-2-7 22:23

©2009-2011 cyuyan.com.cn

回顶部