Visible to Intel only — GUID: GUID-4860BBD0-0E9F-4A69-9348-516F97EDD9CE
Visible to Intel only — GUID: GUID-4860BBD0-0E9F-4A69-9348-516F97EDD9CE
CEILING
Elemental Intrinsic Function (Generic): Returns the smallest integer greater than or equal to its argument.
result = CEILING (a[,kind])
a |
(Input) Must be of type real. |
kind |
(Input; optional) Must be a scalar integer constant expression. |
The result type is integer. If kind is present, the kind parameter of the result is that specified by kind; otherwise, the kind parameter of the result is that of default integer. If the processor cannot represent the result value in the kind of the result, the result is undefined.
The value of the result is equal to the smallest integer greater than or equal to a.
The setting of compiler options specifying integer size can affect this function.
CEILING (4.8) has the value 5.
CEILING (-2.55) has the value -2.0.
The following shows another example:
INTEGER I, IARRAY(2)
I = CEILING(8.01) ! returns 9
I = CEILING(-8.01) ! returns -8
IARRAY = CEILING((/8.01,-5.6/)) ! returns (9, -5)