Name
fesetenv
Synopsis
Sets the floating-point environment to a previously saved state
#include <fenv.h> intfesetenv( const fenv_t *envp);
The fesetenv() function
reinstates the floating-point environment from an object obtained by
a prior call to fegetenv() or
feholdexcept(), or a macro such
as FE_DFL_ENV, which is defined
as a pointer to an object of type fenv_t representing the default
floating-point environment. Although a call to fesetenv() may result in floating-point
exception flags being set, the function does not raise the
corresponding exceptions. The function returns 0 if successful; a
nonzero return value indicates that an error occurred.
Example
See the example for fegetenv() in this
chapter.
See Also
fegetenv(), feholdexcept(),
fegetexceptflag(),
fesetexceptflag(),
feupdateenv(), feclearexcept(),
feraisexcept(), fetestexcept()
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access