[UP]


Manual Reference Pages  - floor (3)

NAME

floor(3f) - [FORTRAN:INTRINSIC:NUMERIC] Integer floor function

DESCRIPTION

floor(a) returns the greatest integer less than or equal to X.

SYNTAX

result = floor(a [, kind])

ARGUMENTS

A The type shall be REAL.
KIND (Optional) An INTEGER initialization expression indicating the kind parameter of the result.

RETURN VALUE

The return value is of type integer(kind) if KIND is present and of default-kind INTEGER otherwise.

EXAMPLE

Sample program:

    program demo_floor
    implicit none
        real :: x = 63.29
        real :: y = -63.59
        print *, floor(x) ! returns 63
        print *, floor(y) ! returns -64
    end program demo_floor

STANDARD

[[Fortran 95]] and later

CLASS

[[Elemental procedure|Elemental function]]

SEE ALSO

ceiling(3), nint(3)


floor (3) March 11, 2021
Generated by manServer 1.08 from 81845c88-5bd7-4d2a-8b6e-6fd0aa884106 using man macros.