*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> f90/ieee_int (3)              
Title
Content
Arch
Section
 

Contents


IEEE_INT(3I)					       Last changed: 1-6-98

NAME    [Toc]    [Back]

     IEEE_INT -	Converts x to an integral value

SYNOPSIS    [Toc]    [Back]

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

IMPLEMENTATION    [Toc]    [Back]

     UNICOS/mk and IRIX	systems

     CRAY T90 systems that support IEEE	floating-point arithmetic

STANDARDS    [Toc]    [Back]

     CF90 and MIPSpro 7	Fortran	90 compiler extension to Fortran 90

     IEEE Standard for Binary Floating-point Arithmetic

DESCRIPTION    [Toc]    [Back]

     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.

NOTES    [Toc]    [Back]

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

     * On UNICOS and UNICOS/mk systems:	 USE CRI_IEEE_DEFINITIONS

     * On UNICOS, UNICOS/mk, and IRIX systems:	USE FTN_IEEE_DEFINITIONS

     The CRI_IEEE_DEFINITIONS module is	obsolescent.  It will be removed
     for the CF90 4.0 release.

RETURN VALUES    [Toc]    [Back]

     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    [Toc]    [Back]

	  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    [Toc]    [Back]

      
      
     Intrinsic Procedures Reference Manual, publication	SR-2138, for the
     printed version of	this man page.

IEEE_INT(3I)					       Last changed: 1-6-98

NAME    [Toc]    [Back]

     IEEE_INT -	Converts x to an integral value

SYNOPSIS    [Toc]    [Back]

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

IMPLEMENTATION    [Toc]    [Back]

     UNICOS/mk and IRIX	systems

     CRAY T90 systems that support IEEE	floating-point arithmetic

STANDARDS    [Toc]    [Back]

     CF90 and MIPSpro 7	Fortran	90 compiler extension to Fortran 90

     IEEE Standard for Binary Floating-point Arithmetic

DESCRIPTION    [Toc]    [Back]

     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.

NOTES    [Toc]    [Back]

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

     * On UNICOS and UNICOS/mk systems:	 USE CRI_IEEE_DEFINITIONS

     * On UNICOS, UNICOS/mk, and IRIX systems:	USE FTN_IEEE_DEFINITIONS

     The CRI_IEEE_DEFINITIONS module is	obsolescent.  It will be removed
     for the CF90 4.0 release.

RETURN VALUES    [Toc]    [Back]

     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    [Toc]    [Back]

	  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    [Toc]    [Back]

      
      
     Intrinsic Procedures Reference Manual, publication	SR-2138, for the
     printed version of	this man page.

[ Back ]
 Similar pages
Name OS Title
floorf FreeBSD largest integral value less than or equal to x
floor FreeBSD largest integral value less than or equal to x
ceil FreeBSD smallest integral value greater than or equal to x
floorf OpenBSD round to largest integral value not greater than x
floor NetBSD round to largest integral value not greater than x
floorf NetBSD round to largest integral value not greater than x
floor OpenBSD round to largest integral value not greater than x
ceilf FreeBSD smallest integral value greater than or equal to x
floor Linux largest integral value not greater than argument
rint FreeBSD round to integral value in floating-point format
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service