ieee_class(3I)

IEEE_CLASS - Returns the class to which x belongs

As shipped in IRIX 6.5.5. Last changed in IRIX 6.5.5.

NAME
     IEEE_CLASS - Returns the class to which x belongs

SYNOPSIS
     IEEE_CLASS ([X=]x)

IMPLEMENTATION
     UNICOS/mk, IRIX systems, CRAY T90 systems that support IEEE
     floating-point arithmetic

     CF90, MIPSpro 7 Fortran 90

STANDARDS
     Fortran extension

     IEEE Standard for Binary Floating-point Arithmetic

DESCRIPTION
     A floating-point number can be classified several ways, such as a
     quiet NaN, a signaling NaN, -0, +inf, etc.  The IEEE_CLASS intrinsic
     function returns a value that indicates the class to which x belongs.

     This function accepts the following argument:

     x         Must be of type real.

     IEEE_CLASS is an elemental function.  The name of this intrinsic
     cannot be passed as an argument.

NOTES
     The IEEE intrinsic procedures use the named constants contained in a
     system module, so you must include the following statement in your
     program:

          USE FTN_IEEE_DEFINITIONS

RETURN VALUES
     The result type and type parameter is default integer.  If x is an
     array, the result is an array of the same shape as x.

     The value returned has a value represented by one of the following
     named constants:

          IEEE_CLASS_SIGNALING_NAN
          IEEE_CLASS_QUIET_NAN
          IEEE_CLASS_NEG_INFINITY
          IEEE_CLASS_NEG_NORM_NONZERO
          IEEE_CLASS_NEG_DENORM
          IEEE_CLASS_NEG_ZERO
          IEEE_CLASS_POS_ZERO
          IEEE_CLASS_POS_DENORM
          IEEE_CLASS_POS_NORM_NONZERO
          IEEE_CLASS_POS_INFINITY

EXAMPLES
          REAL   x
          ...                       ! Compute X.
          SELECT CASE (IEEE_CLASS(x))
            CASE IEEE_CLASS_SIGNALING_NAN
              ...                   ! Do something.
            CASE IEEE_CLASS_QUIET_NAN
              ...                   ! Do something else.
            ...                     ! Other cases.
          END SELECT

SEE ALSO
     Intrinsic Procedures Reference Manual for the printed version of this
     man page.