IEEE_NEXT_AFTER(3I) Last changed: 1-6-98
NAME
IEEE_NEXT_AFTER - Returns the next representable neighbor of x in the
direction toward y
SYNOPSIS
IEEE_NEXT_AFTER ([X=]x, [Y=]y)
IMPLEMENTATION
UNICOS/mk and IRIX systems
CRAY T90 systems that support IEEE floating-point arithmetic
STANDARDS
CF90 and MIPSpro 7 Fortran 90 compiler extension to Fortran 90
IEEE Standard for Binary Floating-point Arithmetic
DESCRIPTION
The IEEE_NEXT_AFTER intrinsic function returns the next representable
neighbor of x in the direction toward y.
IEEE_NEXT_AFTER and the Fortran 90 intrinsic function NEAREST(3I) have
a number of differences, including the Fortran 90 restriction that
argument s to NEAREST(3I) must not be zero.
IEEE_NEXT_AFTER accepts the following arguments:
x Must be of type real.
y Must be of type real. If x is scalar, y must be scalar. If
x is an array, y can be scalar or an array of the same shape
as x.
IEEE_NEXT_AFTER 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 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
The result type and type parameter is the same type and type parameter
as x. If x is an array, the result is an array of the same shape as
x.
The following special cases can affect the result value:
* If x = = y, the result is x without any exception being signaled.
* If either x or y is a quiet NaN, the result is one or the other of
the input NaNs.
* Overflow is signaled when x is finite but IEEE_NEXT_AFTER(x, y) is
infinite. Underflow is signaled when IEEE_NEXT_AFTER(x, y) lies
strictly between
-2**E and +2**E .
min min
In both cases, the inexact exception is signaled.
The result values are produced from the following combinations of
scalar and array arguments:
* If x is scalar, the result is a scalar.
* If x is an array and y is scalar, the result is an array in which
each element is the nearest neighbor of x
i
in the direction of y.
* If x is an array and y is an array, the result is an array in which
each element is the nearest neighbor of
x in the direction of y .
i i
EXAMPLES
REAL x, y
... ! Compute X.
y = IEEE_NEXT_AFTER(x, 1.0)
SEE ALSONEAREST(3I)
Intrinsic Procedures Reference Manual, publication SR-2138, for the
printed version of this man page.