MicrOS
fesetexceptflag.c File Reference
#include "../fenv.h"

Functions

int fesetexceptflag (const fexcept_t *flagp, int excepts)
 Set exception flags. More...
 

Function Documentation

◆ fesetexceptflag()

int fesetexceptflag ( const fexcept_t flagp,
int  excepts 
)

Set exception flags.

Function attempts to set the floating-point status flags indicated by the argument excepts to the states stored in the object pointed to by flagp. The value of *flagp shall have been set by a previous call to fegetexceptflag whose second argument represented at least those floating-point exceptions represented by the argument excepts. This function does not raise floatingpoint exceptions, but only sets the state of the flags.

Parameters
flagpPointer to structure from where we will read expection.
exceptsDefines which excepts will be set.
Returns
Function returns zero if the excepts argument is zero or if all the specified flags were successfully set to the appropriate state. Otherwise, it returns a nonzero value.