| title |
feupdateenv | Microsoft Docs |
| ms.custom |
|
| ms.date |
11/04/2016 |
| ms.reviewer |
|
| ms.suite |
|
| ms.technology |
|
| ms.tgt_pltfrm |
|
| ms.topic |
article |
| apiname |
|
| apilocation |
msvcrt.dll |
msvcr80.dll |
msvcr90.dll |
msvcr100.dll |
msvcr100_clr0400.dll |
msvcr110.dll |
msvcr110_clr0400.dll |
msvcr120.dll |
msvcr120_clr0400.dll |
ucrtbase.dll |
|
| apitype |
HeaderDef |
| f1_keywords |
feupdateenv |
fenv/feupdateenv |
|
| dev_langs |
|
| helpviewer_keywords |
|
| ms.assetid |
3d170042-dfd5-4e4f-a55f-038cf2296cc9 |
| caps.latest.revision |
3 |
| author |
corob-msft |
| ms.author |
corob |
| manager |
ghogen |
| translation.priority.mt |
cs-cz |
de-de |
es-es |
fr-fr |
it-it |
ja-jp |
ko-kr |
pl-pl |
pt-br |
ru-ru |
tr-tr |
zh-cn |
zh-tw |
|
Saves the currently raised floating-point exceptions, restores the specified floating-point environment state, and then raises the saved floating-point exceptions.
int feupdateenv(
const fenv_t* penv
);
penv
Pointer to a fenv_t object that contains a floating-point environment as set by a call to fegetenv or feholdexcept. You can also specify the default startup floating-point environment by using the FE_DFL_ENV macro.
Returns 0 if all actions completed successfully. Otherwise, returns a nonzero value.
Remarks
The feupdateenv function performs multiple actions. First, it stores the current raised floating-point exception status flags in automatic storage. Then, it sets the current floating-point environment from the value stored in the fenv_t object pointed to by penv. If penv is not FE_DFL_ENV or does not point to a valid fenv_t object, subsequent behavior is undefined. Finally, feupdateenv raises the locally stored floating-point exceptions.
To use this function, you must turn off floating-point optimizations that could prevent access by using the #pragma fenv_access(on) directive prior to the call. For more information, see fenv_access.
| Function |
C header |
C++ header |
feupdateenv |
<fenv.h> |
<cfenv> |
For additional compatibility information, see Compatibility.
fegetenv
feclearexcept
feholdexcept
fesetexceptflag