[UP]


Manual Reference Pages  - floor (3)

NAME

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

CONTENTS

Description
Syntax
Arguments
Return Value
Example
Standard
Class
See Also

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
        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]], [[nint]]


floor (3) March 18, 2019
Generated by manServer 1.08 from 9d1be5a5-8e9f-40b6-bd53-c300178920d9 using man macros.