IEEE_INT(3I) Last changed: 1-6-98
IEEE_INT - Converts x to an integral value
IEEE_INT ([X=]x [, [Y=]y])
UNICOS/mk and IRIX systems
CRAY T90 systems that support IEEE floating-point arithmetic
CF90 and MIPSpro 7 Fortran 90 compiler extension to Fortran 90
IEEE Standard for Binary Floating-point Arithmetic
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.
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.
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.
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.
Intrinsic Procedures Reference Manual, publication SR-2138, for the
printed version of this man page.
IEEE_INT(3I) Last changed: 1-6-98
IEEE_INT - Converts x to an integral value
IEEE_INT ([X=]x [, [Y=]y])
UNICOS/mk and IRIX systems
CRAY T90 systems that support IEEE floating-point arithmetic
CF90 and MIPSpro 7 Fortran 90 compiler extension to Fortran 90
IEEE Standard for Binary Floating-point Arithmetic
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.
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.
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.
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.
Intrinsic Procedures Reference Manual, publication SR-2138, for the
printed version of this man page.
[ Back ]
|