Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

fegetexceptflag(3m) [opensolaris man page]

fegetexceptflag(3M)					  Mathematical Library Functions				       fegetexceptflag(3M)

NAME
fegetexceptflag, fesetexceptflag - get and set floating-point status flags SYNOPSIS
cc [ flag... ] file... -lm [ library... ] #include <fenv.h> int fegetexceptflag(fexcept_t *flagp, int excepts); int fesetexceptflag(const fexcept_t *flagp, int excepts); DESCRIPTION
The fegetexceptflag() function attempts to store an implementation-defined representation of the states of the floating-point status flags indicated by the excepts argument in the object pointed to by the flagp argument. The fesetexceptflag() function attempts to set the floating-point status flags indicated by the excepts argument to the states stored in the object pointed to by flagp. The value pointed to by flagp will have been set by a previous call to fegetexceptflag() whose second argu- ment represented at least those floating-point exceptions represented by the excepts argument. This function does not raise floating-point exceptions but only sets the state of the flags. RETURN VALUES
If the representation was successfully stored, fegetexceptflag() returns 0. Otherwise, it returns a non-zero value. If the excepts argument is 0 or if all the specified exceptions were successfully set, fesetexceptflag() returns 0. Otherwise, it returns a non-zero value. ERRORS
No errors are defined. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
fenv.h(3HEAD), feclearexcept(3M), feraiseexcept(3M), fesetexceptflag(3M), attributes(5), standards(5) SunOS 5.11 1 Sep 2002 fegetexceptflag(3M)

Check Out this Related Man Page

FECLEAREXCEPT(3)					   BSD Library Functions Manual 					  FECLEAREXCEPT(3)

NAME
feclearexcept, fegetexceptflag, feraiseexcept, fesetexceptflag, fetestexcept -- functions providing access to the floating-point status flags. SYNOPSIS
#include <fenv.h> #pragma STDC FENV_ACCESS ON int feclearexcept(int excepts); int feraiseexcept(int excepts); int fetestexcept(int excepts); int fegetexceptflag(fexcept_t *flagp, int excepts); int fesetexceptflag(fexcept_t *flagp, int excepts); DESCRIPTION
These functions provide access to the floating-point status flags. The int input argument excepts for the functions represents a subset of floating-point exceptions, and can be either zero or the bitwise OR of one or more floating-point exception macros defined in <fenv.h>, for example FE_OVERFLOW | FE_INEXACT. For other argument values the behavior of these functions is undefined. The feclearexcept() function attempts to clear the supported floating-point flags corresponding to the exceptions specified by its argument. It returns zero if excepts is zero or if the flags corresponding to all specified exceptions were successfully cleared. Otherwise, it returns a nonzero value. The feraiseexcept() function attempts to raise the supported floating-point exceptions specified by its argument. Its effect is similar to that of arithmetic operations raising the same exceptions; if traps are enabled for the exceptions that are raised, they will be taken. The order in which these exceptions are raised is unspecified. On OS X and iOS, raising overflow or underflow using this function will addition- ally raise the inexact exception. The feraiseexcept() function returns zero if excepts is zero or if the specified exceptions were successfully raised. Otherwise a nonzero value is returned. The fetestexcept() function determines if any of the floating-point flags corresponding to the exceptions specified by its argument are cur- rently set. It returns the bitwise OR of the floating-point exception macros corresponding to the currently set flags indicated by excepts. For example, if the underflow and inexact flags are set in the floating-point environment, the result of fetestexcept(FE_INEXACT | FE_INVALID) will be FE_INEXACT. The fegetexceptflag() function attempts to store an implementation-defined representation of the states of the floating-point status flags corresponding to the exceptions specified by excepts in the object pointed to by the argument flagp. It returns zero if the representation is successfully stored, and a nonzero value otherwise. The fesetexceptflag() function attempts to set the floating-point status flags corresponding to the exceptions specified by excepts to the states stored in the object pointed to by flagp. This function does not raise floating-point exceptions--it only sets the state of the flags. The value of *flagp shall have been set by a previous call to fegetexceptflag() whose second argument represented a superset of the exceptions represented by excepts. The fesetexceptflag() function returns zero if the excepts argument is zero or if all the specified flags were successfully set. Otherwise it returns a nonzero value. SEE ALSO
fenv(3), fegetenv(3), fegetround(3), feholdexcept(3), fesetenv(3), fesetround(3), feupdateenv(3) STANDARDS
These functions conform to ISO/IEC 9899:TC3. OS X
May 9, 2011 OS X
Man Page