home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / f90 / ieee_int.z / ieee_int
Encoding:
Text File  |  2002-10-03  |  3.0 KB  |  77 lines

  1. IEEE_INT(3I)                                          Last changed: 4-13-99
  2.  
  3.  
  4. NNAAMMEE
  5.      IIEEEEEE__IINNTT - Converts _x to an integral value
  6.  
  7. SSYYNNOOPPSSIISS
  8.      IIEEEEEE__IINNTT (([XX==]_x [,, [YY==]_y]))
  9.  
  10. IIMMPPLLEEMMEENNTTAATTIIOONN
  11.      UNICOS/mk, IRIX systems, CRAY T90 systems that support IEEE
  12.      floating-point arithmetic
  13.  
  14.      CF90, MIPSpro 7 Fortran 90
  15.  
  16. SSTTAANNDDAARRDDSS
  17.      Fortran extension
  18.  
  19.      IEEE Standard for Binary Floating-point Arithmetic
  20.  
  21. DDEESSCCRRIIPPTTIIOONN
  22.      The IIEEEEEE__IINNTT intrinsic function converts _x to an integral value
  23.      according to the rounding mode currently in effect.  It accepts the
  24.      following arguments:
  25.  
  26.      _x         Must be of type real.  It can be scalar or an array.
  27.  
  28.      _y         If specified, must be scalar and of type integer or real.
  29.  
  30.      IIEEEEEE__IINNTT is an elemental function.  The name of this intrinsic cannot
  31.      be passed as an argument.
  32.  
  33. RREETTUURRNN VVAALLUUEESS
  34.      The result type and type parameters are as follows.  If _y is absent,
  35.      the result type and type parameter is default integer.  If _y is
  36.      present, the result type and type parameter is the same type and type
  37.      parameter as _y.  If _x is an array, the result is an array of the same
  38.      shape as _x.  A conversion between a floating-point integral value and
  39.      an integer is exact unless an exception arises.
  40.  
  41.      If _y is absent, the result is a default integer rounded from _x
  42.      according to the rounding mode currently in effect.
  43.  
  44.      If _y is present and is of type integer, the result is of type integer
  45.      with the same kind type parameter value as _y and whose value is
  46.      rounded from _x according to the rounding mode currently in effect.
  47.  
  48.      If _y is present and is of type real, the result is of type real with
  49.      the same kind type parameter value as _y and whose value is rounded
  50.      from _x according to the rounding mode currently in effect.  If the
  51.      rounding mode is round-to-nearest and the difference between the
  52.      unrounded value of _x and the rounded result of IIEEEEEE__IINNTT is exacty one
  53.      half, the result of IIEEEEEE__IINNTT is even.
  54.  
  55.      The format of the result value is determined as follows:
  56.  
  57.      * If _x is scalar, the result is a scalar.
  58.  
  59.      * If _x is an array, the result is an array in which each element is
  60.        the value of _x
  61.                      _i
  62.        rounded to the type and type parameter of _y.
  63.  
  64. EEXXAAMMPPLLEESS
  65.           REAL  x
  66.           ...
  67.           PRINT *, IEEE_INT(x, 1)
  68.           PRINT *, IEEE_INT(x, 1.0)
  69.  
  70.      If xx had the value 4.1, the result of the first invocation of IIEEEEEE__IINNTT
  71.      would be integer value 4 and the second result would be the real value
  72.      4.0.
  73.  
  74. SSEEEE AALLSSOO
  75.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l for the printed version of this
  76.      man page.
  77.