数学错误常量Math Error Constants

语法Syntax


#include <math.h>  

备注Remarks

运行库的数学例程可生成数学错误常量。The math routines of the run-time library can generate math error constants.

如下所述,这些错误对应于 MATH.H 中定义的异常类型,并在发生数学错误后由 _matherr 函数返回。These errors, described as follows, correspond to the exception types defined in MATH.H and are returned by the _matherr function when a math error occurs.

常量Constant 含义Meaning
_DOMAIN 函数的自变量位于函数域的外部。Argument to function is outside domain of function.
_OVERFLOW 结果太大而无法在函数的返回类型中表示。Result is too large to be represented in function's return type.
_PLOSS 发生了有效位部分丢失的情况。Partial loss of significance occurred.
_SING 自变量奇异性:函数的自变量具有非法值。Argument singularity: argument to function has illegal value. (例如,将值 0 传递到需要非零值的函数。)(For example, value 0 is passed to function that requires nonzero value.)
_TLOSS 发生了有效位完全丢失的情况。Total loss of significance occurred.
_UNDERFLOW 结果太小而无法表示。Result is too small to be represented.

另请参阅See Also

_matherr _matherr
全局常量Global Constants