## FLOOR Floor Function

Section: Elementary Functions

### Usage

Computes the floor of an n-dimensional array elementwise. The floor of a number is defined as the smallest integer that is less than or equal to that number. The general syntax for its use is

       y = floor(x)

where `x` is a multidimensional array of numerical type. The `floor` function preserves the type of the argument. So integer arguments are not modified, and `float` arrays return `float` arrays as outputs, and similarly for `double` arrays. The `floor` function is not defined for `complex` or `dcomplex` types.

### Example

The following demonstrates the `floor` function applied to various (numerical) arguments. For integer arguments, the floor function has no effect:

    --> floor(3)

    ans =

     3

    --> floor(-3)

    ans =

     -3

    -->
    quit

Next, we take the `floor` of a floating point value:

    --> floor(3.023f)

    ans =

     3

    --> floor(-2.341f)

    ans =

     -3

    -->
    quit

Note that the return type is a `float` also. Finally, for a `double` type:

    --> floor(4.312)

    ans =

     4

    --> floor(-5.32)

    ans =

     -6

    -->
    quit