nearest(3I)

NEAREST - Returns the nearest different machine representable number in a given direction

As shipped in IRIX 6.5.22. Last changed in IRIX 6.5.19.

NAME
     NEAREST - Returns the nearest different machine representable number
     in a given direction

SYNOPSIS
     NEAREST ([X=]x, [S=]s)

STANDARDS
     Fortran

DESCRIPTION
     The NEAREST intrinsic function returns the nearest different machine
     representable number in a given direction.  It accepts the following
     arguments:

     x         Must be of type real

     s         Must be of type real and not equal to zero

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

RETURN VALUES
     The result type and type parameter are the same as x.  The result has
     a value equal to the machine representable number distinct from x and
     nearest to it in the direction of the infinity with the same sign as
     s.

EXAMPLES
     NEAREST(3.0,2.0) yields 3 + 2-22 according to the real number system
     model.

     For more information on the real number model, see the MODELS(3I) man
     page.

SEE ALSO
     MODELS(3I)