Implementation status: to be implemented


#include <fenv.h>

int feholdexcept(fenv_t *envp);


The feholdexcept() function saves current floating-point environment.


envp - the pointer to the current floating-point environment.

The feholdexcept() function saves the current floating-point environment in the object of fenv_t and then resets the current values of all the floating point status flags.

Return value

The feholdexcept() function returns zero if and only if non-stop floating-point exception handling was successfully installed, otherwise it returns -1.


No errors are defined.

Implementation tasks

  • Implement fenv.h.
  • Implement feholdexcept().