ceiling
- Date:
04-18-2022
NAME
CEILING - Returns the least integer greater than or equal to a
SYNOPSIS
CEILING ([A=]a [,[KIND=]kind])
IMPLEMENTATION
Cray Linux Environment (CLE)
STANDARDS
Fortran
DESCRIPTION
The CEILING intrinsic function returns the least integer greater than or equal to a. It accepts the following arguments:
- a
Must be of type real.
- kind
Must be a scalar integer initialization expression.
CEILING is an elemental function. The name of this intrinsic cannot be passed as an argument.
RETURN VALUES
The result type is an integer. If kind is specified, the kind type parameter is that specified by kind. If kind is not specified, the result is of type default integer. The result has a value equal to the least integer greater than or equal to a.
The Fortran standard does not specifiy behavior when the result is not represented by the requested integer type. A WARNING is issued when the result is known to be out of range at compile time; the operation folds to the appropriate extreme value. Otherwise out of range results are defined only with -hfp0; likewise returning extreme values.
EXAMPLES
CEILING(3.7) yields 4.
CEILING(-3.7) yields -3.
SEE ALSO
Cray Fortran Reference Manual