ieee_int(3I)

IEEE_INT - Converts x to an integral value

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

NAME
     IEEE_INT - Converts x to an integral value

SYNOPSIS
     IEEE_INT ([X=]x [, [Y=]y])

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
     The IEEE_INT intrinsic function converts x to an integral value
     according to the rounding mode currently in effect.  It accepts the
     following arguments:

     x         Must be of type real.  It can be scalar or an array.

     y         If specified, must be scalar and of type integer or real.

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

RETURN VALUES
     The result type and type parameters are as follows.  If y is absent,
     the result type and type parameter is default integer.  If y is
     present, the result type and type parameter is the same type and type
     parameter as y.  If x is an array, the result is an array of the same
     shape as x.  A conversion between a floating-point integral value and
     an integer is exact unless an exception arises.

     If y is absent, the result is a default integer rounded from x
     according to the rounding mode currently in effect.

     If y is present and is of type integer, the result is of type integer
     with the same kind type parameter value as y and whose value is
     rounded from x according to the rounding mode currently in effect.

     If y is present and is of type real, the result is of type real with
     the same kind type parameter value as y and whose value is rounded
     from x according to the rounding mode currently in effect.  If the
     rounding mode is round-to-nearest and the difference between the
     unrounded value of x and the rounded result of IEEE_INT is exacty one
     half, the result of IEEE_INT is even.

     The format of the result value is determined as follows:

     * If x is scalar, the result is a scalar.

     * If x is an array, the result is an array in which each element is
       the value of x
                     i
       rounded to the type and type parameter of y.

EXAMPLES
          REAL  x
          ...
          PRINT *, IEEE_INT(x, 1)
          PRINT *, IEEE_INT(x, 1.0)

     If x had the value 4.1, the result of the first invocation of IEEE_INT
     would be integer value 4 and the second result would be the real value
     4.0.

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