floor

Date:

04-18-2022

NAME

FLOOR - Returns the greatest integer less than or equal to a

SYNOPSIS

FLOOR ([A=]a [,[KIND=]kind])

IMPLEMENTATION

Cray Linux Environment (CLE)

STANDARDS

Fortran

DESCRIPTION

The FLOOR intrinsic function returns the greatest integer less than or equal to a. It accepts the following arguments:

a

Must be of type real

kind

Must be a scalar integer initialization expression.

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

RETURN VALUES

The result 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 value equal to the greatest integer less 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.

NOTES

Note: The floor() function has a Linux-equivalent name. Use the man -aname option to show all manual pages matching name within the MANPATH search path. Manual pages are displayed in the order found.

EXAMPLES

FLOOR(3.7) yields 3.

FLOOR(-3.7) yields -4.

SEE ALSO

Cray Fortran Reference Manual