# Floor()

### Floor()

Rounds down a number to the next integer

Syntax

`      Floor( <nNumber> ) -> <nDownRoundedNumber>`

Arguments

<nNumber> number to round down

Returns

<nDownRoundedNumber> the rounded number

Description

The function Floor() determines the biggest integer that is smaller than <nNumber>.

Examples

```      ? Floor( 1.1 )  // --> 1.0
? Floor( -1.1 ) // --> -2.0```

Tests

```      Floor( 1.1 )  == 1.0
Floor( -1.1 ) == -2.0```

Compliance

Floor() is compatible with CT3’s Floor().

Platforms

All

Files

Source is math.c, library is libct.

Seealso

CEILING()

# CT_CEILING

``` CEILING()
Rounds up to the next integer
------------------------------------------------------------------------------
Syntax

CEILING(<nValue>) --> nLargerInteger

Argument

<nValue>  Designates the number for which the next-largest integer
is determined.

Returns

CEILING() returns the next-largest integer to the one that is passed as
a parameter.

Description

CEILING() returns the next-largest integer to the one passed as a
parameter.  This applies to positive and negative numbers.

Example

Show the next-largest integer (including positive and negative numbers):

? CEILING(1.9)            // Result:   2
? CEILING(1.1)            // Result:   2
? CEILING(0.9)            // Result:   1
? CEILING(-0.1)           // Result:   0
? CEILING(-0.9)           // Result:   0
? CEILING(-1.1)           // Result:-1```

# Tools — Mathematical Functions

```Introduction Mathematical Functions
ACOS()    Computes the cosine arc
ASIN()    Computes the sine arc
ATAN()    Computes the tangent arc
ATN2()    Computes the angle size from the sine and cosine
CEILING() Rounds up to the next integer
COS()     Computes the cosine
COT()     Computes the cotangent
DTOR()    Converts from a degree to radian measure
FACT()    Computes the factorial
FLOOR()   Rounds down to the next integer
FV()      Computes future value of capital
GETPREC() Determines the level of precision that is set
LOG10()   Computes the common logarithm
PAYMENT() Computes the periodic payment amount
PERIODS() Computes number of payment periods necessary to repay a loan
PI()      Returns pi with the highest degree of accuracy
PV()      Computes the cash present value after interest charges
RATE()    Computes the interest rate for a loan
RTOD()    Converts from a radian to degree measure
SETPREC() Sets the precision level for trigonometric functions
SIGN()    Determines the mathematical sign of a number
SIN()     Computes the sine of a radian value
TAN()     Computes the tangent of a radian value```