Previous Topic: System-Supplied FunctionsNext Topic: Date Functions


Arithmetic Functions

Arithmetic built-in functions (with the exception of NUMERIC) perform arithmetic operations on numeric values and return numeric values as results.

Function

Keyword

What it does

Absolute value

ABSOLUTE-VALUE

Returns the absolute value of a numeric value

Logarithm (base 10)

LOG-BASE-10

Returns the common logarithm of a numeric value

Logarithm (base E)

LOG-BASE-E

Returns the natural logarithm of a numeric value

Modulo

MODULO

Returns the modulus (remainder) of one specified numeric value divided by another

Next integer equal or higher

NEXT-INT-EQHI

Returns the smallest integer that is equal to or greater than a specified numeric value

Next integer equal or lower

NEXT-INT-EQLO

Returns the largest integer that is equal to or lower than a specified numeric value

Numeric

NUMERIC

Returns TRUE or FALSE to indicate whether a field is numeric

Random number

RANDOM-NUMBER

Returns a pseudo-random number based on a seed numeric value

Sign inversion

INVERT-SIGN

Returns the value of a numeric value multiplied by -1

Sign value

SIGN-VALUE

Returns a +1, 0, or -1, depending on whether a numeric value is positive, zero, or negative

Square root

SQUARE-ROOT

Returns the square root of a numeric value