Next: , Previous: , Up: Fenv   [Contents][Index]


3.8 fesetexceptflag—set floating-point status flags

Synopsis

#include <fenv.h>
int fesetexceptflag(const fexcept_t *flagp, int excepts);

Link with -lm.

Description
This method attempts to set the floating-point status flags specified by excepts to the states indicated by flagp. The argument flagp must point to an fexcept_t instance obtained via calling fegetexceptflag with at least the floating-point exceptions specified by the argument excepts.

This method does not raise any floating-point exceptions. It only sets the state of the flags.


Returns
If the information was successfully returned, this method returns zero. Otherwise, a non-zero value is returned.


Portability
ANSI C requires fesetexceptflag.

Not all Newlib targets have a working implementation. Refer to the file sys/fenv.h to see the status for your target.