Back to index

glibc  2.9
Defines | Typedefs | Enumerations | Variables
fenv.h File Reference

Go to the source code of this file.

Defines

#define FE_INEXACT   FE_INEXACT
#define FE_DIVBYZERO   FE_DIVBYZERO
#define FE_UNDERFLOW   FE_UNDERFLOW
#define FE_OVERFLOW   FE_OVERFLOW
#define FE_INVALID   FE_INVALID
#define FE_ALL_EXCEPT   (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)
#define FE_TONEAREST   FE_TONEAREST
#define FE_TOWARDZERO   FE_TOWARDZERO
#define FE_UPWARD   FE_UPWARD
#define FE_DOWNWARD   FE_DOWNWARD
#define FE_DFL_ENV   (&__fe_dfl_env)

Typedefs

typedef unsigned int fexcept_t
typedef double fenv_t

Enumerations

enum  {
  FE_INEXACT = 1 << (31 - 6), FE_INEXACT = 1 << (31 - 6), FE_DIVBYZERO = 1 << (31 - 5), FE_DIVBYZERO = 1 << (31 - 5),
  FE_UNDERFLOW = 1 << (31 - 4), FE_UNDERFLOW = 1 << (31 - 4), FE_OVERFLOW = 1 << (31 - 3), FE_OVERFLOW = 1 << (31 - 3),
  FE_INVALID = 1 << (31 - 2), FE_INVALID = 1 << (31 - 2)
}
enum  {
  FE_TONEAREST = 0, FE_TONEAREST = 0, FE_TOWARDZERO = 1, FE_TOWARDZERO = 1,
  FE_UPWARD = 2, FE_UPWARD = 2, FE_DOWNWARD
}

Variables

const fenv_t __fe_dfl_env

Define Documentation

Definition at line 99 of file fenv.h.

#define FE_DFL_ENV   (&__fe_dfl_env)

Definition at line 126 of file fenv.h.

#define FE_DIVBYZERO   FE_DIVBYZERO

Definition at line 31 of file fenv.h.

#define FE_DOWNWARD   FE_DOWNWARD
#define FE_INEXACT   FE_INEXACT

Definition at line 29 of file fenv.h.

#define FE_INVALID   FE_INVALID

Definition at line 44 of file fenv.h.

#define FE_OVERFLOW   FE_OVERFLOW

Definition at line 35 of file fenv.h.

#define FE_TONEAREST   FE_TONEAREST

Definition at line 108 of file fenv.h.

Definition at line 110 of file fenv.h.

#define FE_UNDERFLOW   FE_UNDERFLOW

Definition at line 33 of file fenv.h.

#define FE_UPWARD   FE_UPWARD

Definition at line 112 of file fenv.h.


Typedef Documentation

typedef double fenv_t

Definition at line 122 of file fenv.h.

typedef unsigned int fexcept_t

Definition at line 118 of file fenv.h.


Enumeration Type Documentation

anonymous enum
Enumerator:
FE_INEXACT 
FE_INEXACT 
FE_DIVBYZERO 
FE_DIVBYZERO 
FE_UNDERFLOW 
FE_UNDERFLOW 
FE_OVERFLOW 
FE_OVERFLOW 
FE_INVALID 
FE_INVALID 

Definition at line 26 of file fenv.h.

  {
    FE_INEXACT = 1 << (31 - 6),
#define FE_INEXACT   FE_INEXACT
    FE_DIVBYZERO = 1 << (31 - 5),
#define FE_DIVBYZERO FE_DIVBYZERO
    FE_UNDERFLOW = 1 << (31 - 4),
#define FE_UNDERFLOW FE_UNDERFLOW
    FE_OVERFLOW = 1 << (31 - 3),
#define FE_OVERFLOW  FE_OVERFLOW

    /* ... except for FE_INVALID, for which we use bit 31. FE_INVALID
       actually corresponds to bits 7 through 12 and 21 through 23
       in the FPSCR, but we can't use that because the current draft
       says that it must be a power of 2.  Instead we use bit 2 which
       is the summary bit for all the FE_INVALID exceptions, which
       kind of makes sense.  */
    FE_INVALID = 1 << (31 - 2),
#define FE_INVALID   FE_INVALID

#ifdef __USE_GNU
    /* Breakdown of the FE_INVALID bits. Setting FE_INVALID on an
       input to a routine is equivalent to setting all of these bits;
       FE_INVALID will be set on output from a routine iff one of
       these bits is set.  Note, though, that you can't disable or
       enable these exceptions individually.  */

    /* Operation with SNaN. */
    FE_INVALID_SNAN = 1 << (31 - 7),
# define FE_INVALID_SNAN    FE_INVALID_SNAN

    /* Inf - Inf */
    FE_INVALID_ISI = 1 << (31 - 8),
# define FE_INVALID_ISI            FE_INVALID_ISI

    /* Inf / Inf */
    FE_INVALID_IDI = 1 << (31 - 9),
# define FE_INVALID_IDI            FE_INVALID_IDI

    /* 0 / 0 */
    FE_INVALID_ZDZ = 1 << (31 - 10),
# define FE_INVALID_ZDZ            FE_INVALID_ZDZ

    /* Inf * 0 */
    FE_INVALID_IMZ = 1 << (31 - 11),
# define FE_INVALID_IMZ            FE_INVALID_IMZ

    /* Comparison with NaN or SNaN.  */
    FE_INVALID_COMPARE = 1 << (31 - 12),
# define FE_INVALID_COMPARE FE_INVALID_COMPARE

    /* Invalid operation flag for software (not set by hardware).  */
    /* Note that some chips don't have this implemented, presumably
       because no-one expected anyone to write software for them %-).  */
    FE_INVALID_SOFTWARE = 1 << (31 - 21),
# define FE_INVALID_SOFTWARE       FE_INVALID_SOFTWARE

    /* Square root of negative number (including -Inf).  */
    /* Note that some chips don't have this implemented.  */
    FE_INVALID_SQRT = 1 << (31 - 22),
# define FE_INVALID_SQRT    FE_INVALID_SQRT

    /* Conversion-to-integer of a NaN or a number too large or too small.  */
    FE_INVALID_INTEGER_CONVERSION = 1 << (31 - 23)
# define FE_INVALID_INTEGER_CONVERSION    FE_INVALID_INTEGER_CONVERSION

# define FE_ALL_INVALID \
        (FE_INVALID_SNAN | FE_INVALID_ISI | FE_INVALID_IDI | FE_INVALID_ZDZ \
        | FE_INVALID_IMZ | FE_INVALID_COMPARE | FE_INVALID_SOFTWARE \
        | FE_INVALID_SQRT | FE_INVALID_INTEGER_CONVERSION)
#endif
  };
anonymous enum
Enumerator:
FE_TONEAREST 
FE_TONEAREST 
FE_TOWARDZERO 
FE_TOWARDZERO 
FE_UPWARD 
FE_UPWARD 
FE_DOWNWARD 

Definition at line 105 of file fenv.h.

  {
    FE_TONEAREST = 0,
#define FE_TONEAREST FE_TONEAREST
    FE_TOWARDZERO = 1,
#define FE_TOWARDZERO       FE_TOWARDZERO
    FE_UPWARD = 2,
#define FE_UPWARD    FE_UPWARD
    FE_DOWNWARD = 3
#define FE_DOWNWARD  FE_DOWNWARD
  };

Variable Documentation