Function reference · Math

floor

Rounds a number down to the nearest integer.

For a symbol, the call is returned unevaluated.

Notation

floor(x)

Write it in an expression: nerdamer('floor(3.7)'), or in the Playground.

nerdamer.floor

nerdamer.floor(x: ExpressionInput): Expression

A method on the default import. Arguments can be strings, as in Notation.

Examples

Down, for a positive number.

floor(3.7)
// → 3
Open in Playground

Down is away from zero for a negative number.

floor(-2.3)
// → -3
Open in Playground

← Back to Function reference