FE_DIVBYZERO, FE_INEXACT, FE_INVALID, FE_OVERFLOW, FE_UNDERFLOW, FE_ALL_EXCEPT
来自cppreference.com
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
在头文件 <<fenv.h>> 中定义
|
||
#define FE_DIVBYZERO /*implementation defined power of 2*/ |
||
#define FE_INEXACT /*implementation defined power of 2*/ |
||
#define FE_INVALID /*implementation defined power of 2*/ |
||
#define FE_OVERFLOW /*implementation defined power of 2*/ |
||
#define FE_UNDERFLOW /*implementation defined power of 2*/ |
||
#define FE_ALL_EXCEPT FE_DIVBYZERO | FE_INEXACT | \ FE_INVALID | FE_OVERFLOW | \ |
||
所有这些宏观常数(除FE_ALL_EXCEPT)扩大到整数常量表达式是不同的2的幂,唯一地标识所有受支持的浮点异常。每个宏定义,如果它支持.
原文:
All these macro constants (except FE_ALL_EXCEPT) expand to integer constant expressions that are distinct powers of 2, which uniquely identify all supported floating-point exceptions. Each macro is only defined if it is supported.
宏常数FE_ALL_EXCEPT,扩展位或所有其他
FE_*
,始终定义是零,如果不支持浮点异常的实施.原文:
The macro constant FE_ALL_EXCEPT, which expands to the bitwise OR of all other
FE_*
, is always defined and is zero if floating-point exceptions are not supported by the implementation. 常数
|
Explanation |
FE_DIVBYZERO
|
(以较早者为准)浮点运算过程中发生被零除
原文: division by zero occurred during the earlier floating-point operation |
FE_INEXACT
|
不精确的结果:,四舍五入是必要的存储(以较早者为准)浮点运算的结果
原文: inexact result: rounding was necessary to store the result of the earlier floating-point operation |
FE_INVALID
|
无效的操作:(以较早者为准)浮点运算,无法执行
原文: invalid operation: the earlier floating-point operation could not performed |
FE_OVERFLOW
|
早期的浮点运算的结果是太大,无法表示的
原文: the result of the earlier floating-point operation was too large to be representable |
FE_UNDERFLOW
|
(以较早者为准)浮点运算的结果是低于正常值
原文: the result of the earlier floating-point operation was subnormal |
FE_ALL_EXCEPT
|
按位或(OR)的所有受支持的浮点异常
原文: bitwise OR of all supported floating-point exceptions |
实现可以定义额外的宏常量
<fenv.h>
,以确定额外的浮点异常。所有这些常量开始FE_
,然后由至少一个大写字母.原文:
The implementation may define additional macro constants in
<fenv.h>
to identify additional floating-point exceptions. All such constants begin with FE_
followed by at least one uppercase letter.[编辑] 示例
本章尚未完成 原因:暂无示例 |
[编辑] 另请参阅
C++ documentation for floating point exception macros
|