Math Functions

ABS

Calculates the absolute value of a number. If the number is negative, the positive value is returned.

Usage

ABS(numeric)

Parameters

Parameter

Type

Description

numeric

number

The numeric value for which to find the absolute value

Examples

Formula

Return value

ABS(-10)

10

ABS(5)

5

ABS(0)

0

FLOOR

Rounds a numeric value down, toward zero, to the nearest integer.

Usage

FLOOR(numeric)

Parameters

Parameter

Type

Description

numeric

number

The numeric value to round down

Examples

Formula

Return value

FLOOR(4.5)

4

FLOOR(-4.5)

-5

FLOOR(0)

0

CEILING

Rounds a numeric value up, away from zero, to the nearest integer.

Usage

CEILING(numeric)

Parameters

Parameter

Type

Description

numeric

number

The numeric value to round up

Examples

Formula

Return value

CEILING(4.5)

5

CEILING(-4.5)

-4

CEILING(0)

0

ROUND

Rounds a numeric value to the nearest integer.

Usage

ROUND(numeric)

Parameters

Parameter

Type

Description

numeric

number

The numeric value to round

Examples

Formula

Return value

ROUND(4.5)

5

ROUND(4.4)

4

ROUND(-4.5)

-4

MIN

Returns the smallest element in a set of elements.

Usage

MIN(e1, [e2], ...)

Parameters

Parameter

Type

Description

e1

string or number

The first element in the set

e2

string or number

(Optional) Additional elements to compare

Examples

Formula

Return value

MIN(3, 5, 7)

3

MIN('a', 'b')

'a'

MIN(0)

0

MAX

Returns the largest element in a set of elements.

Usage

MAX(e1, [e2], ...)

Parameters

Parameter

Type

Description

e1

string or number

The first element in the set

e2

string or number

(Optional) Additional elements to compare

Examples

Formula

Return value

MAX(3, 5, 7)

7

MAX('a', 'b')

'b'

MAX(0)

0