floor

Gamma: Version 4.0
Prev |  | Next

# `floor`

`floor` -- rounds a real number down to its integer value.

## Syntax

    floor (number)

## Arguments

`number`

  Any number. Non-numbers are treated as zero.

## Returns

The largest integer which is less than or equal to the `number`.

## Example

        Gamma> floor(1.2);
        1
        Gamma> floor(1.9);
        1
        Gamma> floor(-1.2);
        -2
        Gamma> floor(-1.9);
        -2
        Gamma>

See the Plant Model section of the PID Emulator chapter in the Cogent Tools Demo and Tutorials book for an example of this function used in context.

## See Also

`ceil`, `round`

Prev | Home | Next
`exp` | Up | `log`, `log10`, `logn`

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.