Back to index

glibc  2.9
Functions
fegetexcept.c File Reference
#include <fenv_libc.h>

Go to the source code of this file.

Functions

int __fegetexcept (void)

Function Documentation

int __fegetexcept ( void  )

Definition at line 24 of file fegetexcept.c.

{
  fenv_union_t fe;
  int result = 0;

  fe.fenv = fegetenv_register ();

  if (fe.l[1] & (1 << (31 - FPSCR_XE)))
      result |= FE_INEXACT;
  if (fe.l[1] & (1 << (31 - FPSCR_ZE)))
      result |= FE_DIVBYZERO;
  if (fe.l[1] & (1 << (31 - FPSCR_UE)))
      result |= FE_UNDERFLOW;
  if (fe.l[1] & (1 << (31 - FPSCR_OE)))
      result |= FE_OVERFLOW;
  if (fe.l[1] & (1 << (31 - FPSCR_VE)))
      result |= FE_INVALID;

  return result;
}

Here is the caller graph for this function: