Algebraic functions take one or more arguments of numeric data
types. Besides supporting numeric arguments, the
CEIL and
FLOOR functions
can also take character string arguments that can be converted to
DECIMAL values, and the
ROUND and
TRUNC functions can
also take DATE or DATETIME arguments.
Algebraic Functions
|--+-+-ABS---+--(--num_expression--)------------------------------+--|
| +-CEIL--+ |
| '-FLOOR-' |
| .------------. |
| V | |
+-GREATEST--(----expression-+--,--expression--+--)-------------+
| .------------. |
| V | |
+-LEAST--(----expression-+--,--expression--+--)----------------+
+-MOD--(--dividend, divisor--)---------------------------------+
+-+-POW---+--(--base, exponent--)------------------------------+
| '-POWER-' |
| .- , - 2 ---. |
+-ROOT--(--radicand--+------------+--)-------------------------+
| '- , - index-' |
| .- , - 0 ----. |
+-+-ROUND-+--(--+-num_expression--+--+--------------+--)-------+
| '-TRUNC-' '-date_expression-' '- , - factor-' |
+-+-ROUND-+--(--date_expression--+----------------------+--)---+
| '-TRUNC-' '- , ' +- DD ---+- ' ' |
| +- DAY --+ |
| +- MONTH + |
| '- YEAR -' |
| .- , - 'DD' --------. |
+-+-ROUND-+--(--datetime_expression--+--------------------+--)-+
| '-TRUNC-' '- , ' +- MI ---+- ' ' |
| +- HH ---+ |
| +- DAY --+ |
| +- MONTH + |
| '- YEAR -' |
'-SQRT--(--sqrt_radicand--)------------------------------------'
Element |
Description |
Restrictions |
Syntax |
base |
Value to be raised to the power specified in exponent |
Must return a real number |
Expression |
date_expression |
Expression that evaluates to (or is cast to) a
DATE value |
Must return a DATE value |
Expression |
datetime_expression |
Expression that evaluates to (or is cast to) a
DATETIME value |
Must return a DATETIME value |
Expression |
dividend |
Value to be divided by divisor |
A real number |
Expression |
divisor |
Value by which to divide dividend |
A nonzero real number |
Expression |
exponent |
Power to which to raise base |
A real number |
Expression |
factor |
Number of significant digits to replace with zero
in the returned value. Default is to return the rounded or truncated
integer part of the first argument. |
Integer in range +32 to -32. Positive or unsigned
values are applied to the right of the decimal point, and negative
values are applied to the left. |
Literal Number |
index |
Root to extract. The default is 2. |
A nonzero real number |
Expression |
num_expression |
Expression that evaluates to (or is cast to) a
numeric value |
A real number |
Expression |
radicand |
Value whose root is to be returned |
A real number |
Expression |
sqrt_radicand |
Number with a real square root |
A nonnegative real number |
Expression |