fegetenv, fesetenv

来自cppreference.com
< c | numeric | fenv

 
 
 
浮点环境
功能
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
feclearexcept(C99)
fetestexcept(C99)
feraiseexcept(C99)
fegetexceptflag
fesetexceptflag
(C99)
(C99)
fegetround
fesetround
(C99)
(C99)
fegetenv
fesetenv
(C99)
feholdexcept(C99)
feupdateenv(C99)
宏常量
Original:
Macro constants
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
FE_ALL_EXCEPT
FE_DIVBYZERO
FE_INEXACT
FE_INVALID
FE_OVERFLOW
FE_UNDERFLOW
(C99)
FE_DOWNWARD
FE_TONEAREST
FE_TOWARDZERO
FE_UPWARD
(C99)
FE_DFL_ENV(C99)
 
Defined in header <<fenv.h>>
int fegetenv( fenv_t* envp );
(1) (C99 起)
int fesetenv( const fenv_t* envp );
(2) (C99 起)
1)
试图存储状态的浮点环境中的对象指向的值,envp
Original:
Attempts to store the status of the floating-point environment in the object pointed to by envp.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
尝试建立的浮点环境的envp指向的对象。对象,必须预先获得通过调用feholdexceptfegetenv或一个浮点宏常数,如果有任何的浮点状态标志被设置在envp,他们变得​​在环境(设置,并且然后可测试与fetestexcept),但不提出相应的浮点异常(继续执行不间断)
Original:
Attempts to establish the floating-point environment from the object pointed to by envp. The value of that object must be previously obtained by a call to feholdexcept or fegetenv or be a floating-point macro constant. If any of the floating-point status flags are set in envp, they become set in the environment (and are then testable with fetestexcept), but the corresponding floating-point exceptions are not raised (execution continues uninterrupted)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

目录

[编辑] 参数

envp -
指针指向的对象类型fenv_t持有的地位浮点环境
Original:
pointer to the object of type fenv_t which holds the status of the floating-point environment
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[编辑] 返回值

0成功,否则返回非零值.
Original:
0 on success, non-zero otherwise.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[编辑] 为例

[编辑] 另请参阅

(C99)
保存环境,清除所有状态标志,而忽略了未来所有的错误
Original:
saves the environment, clears all status flags and ignores all future errors
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
(C99)
浮点环境恢复和提高了先前抛出异常
Original:
restores the floating-point environment and raises the previously raise exceptions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
(C99)
默认的浮点环境
Original:
default floating-point environment
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(宏不变) [edit]
C++ documentation for fegetenv, fesetenv