ceiling(3f) - [FORTRAN:INTRINSIC:NUMERIC] Integer ceiling function
result = ceiling(a [, kind])
ceiling(a) returns the least integer greater than or equal to A.
A The type shall be REAL. KIND (Optional) An INTEGER initialization expression indicating the kind parameter of the result.
The return value is of type integer(kind) if KIND is present and a default-kind INTEGER otherwise.
Sample program:
program demo_ceiling implicit none real :: x = 63.29 real :: y = -63.59 print *, ceiling(x) ! returns 64 print *, ceiling(y) ! returns -63 end program demo_ceiling
[[Fortran 95]] and later
[[Elemental procedure|Elemental function]]
floor(3), nint(3)
ceiling (3) | March 11, 2021 |