std::fegetenv, std::fesetenv
来自cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| Defined in header <cfenv>
|
||
| int fegetenv( std::fenv_t* envp ) |
(1) | (C++11 起) |
| int fesetenv( const std::fenv_t* envp ); |
(2) | (C++11 起) |
试图存储状态的浮点环境中的对象指向的值,
2) envpOriginal:
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.
You can help to correct and verify the translation. Click here for instructions.
尝试建立的浮点环境的
envp指向的对象。对象,必须预先获得通过调用std::feholdexcept或std::fegetenv或一个浮点宏常数,如果有任何的浮点状态标志被设置在envp,他们变得在环境(设置,并且然后可测试与std::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 std::feholdexcept or std::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 std::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.
You can help to correct and verify the translation. Click here for instructions.
[编辑] 参数
| envp | - | 指针指向的对象类型std::fenv_t持有的地位浮点环境
Original: pointer to the object of type std::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.
You can help to correct and verify the translation. Click here for instructions.
[编辑] 另请参阅
| (C++11) |
保存环境,清除所有状态标志,而忽略了未来所有的错误 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. (函数) |
| (C++11) |
浮点环境恢复和提高了先前抛出异常 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. (函数) |
| (C++11) |
默认的浮点环境 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. (宏不变) |