Back to index

glibc  2.9
Functions
fclrexcpt.c File Reference
#include <fenv_libc.h>
#include <shlib-compat.h>

Go to the source code of this file.

Functions

int __feclearexcept (int excepts)
 versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2)

Function Documentation

int __feclearexcept ( int  excepts)

Definition at line 24 of file fclrexcpt.c.

{
  fenv_union_t u;

  /* Get the current state.  */
  u.fenv = fegetenv_register ();

  /* Clear the relevant bits.  */
  u.l[1] = u.l[1] & ~((-(excepts >> (31 - FPSCR_VX) & 1) & FE_ALL_INVALID)
                    | (excepts & FPSCR_STICKY_BITS));

  /* Put the new state in effect.  */
  fesetenv_register (u.fenv);

  /* Success.  */
  return 0;
}
versioned_symbol ( libm  ,
__feclearexcept  ,
feclearexcept  ,
GLIBC_2_2   
)