Algebraic Functions

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

1 
2.1 ABS
2.1 CEIL
2.1 FLOOR
1 (
1 num_expression
1 )
1  GREATEST ( +  expression , expression +--)
1  LEAST ( +  expression , expression +--)
1  MOD ( dividend, divisor )
1 
2.1 POW
2.1 POWER
1 (
1 base, exponent
1 )
1  ROOT ( radicand
2.1!   ,   2  
2.1   ,   index
1 )
1 
2.1 ROUND
2.1 TRUNC
1 (
2.1 num_expression
2.1 date_expression
2.1!   ,
   0  
2.1   ,    factor
1 )
1 
2.1 ROUND
2.1 TRUNC
1 (
1 date_expression
1?  ,   '  
2.1  DD 
2.1  DAY 
2.1  MONTH 
2.1  YEAR 
1 ' 
1 )
1 
2.1 ROUND
2.1 TRUNC
1 (
1 datetime_expression
2.1!   ,
   'DD' 
2.1  ,  ' 
2.2.1  MI 
2.2.1  HH 
2.2.1  DAY 
2.2.1  MONTH 
2.2.1  YEAR 
2.1 ' 
1 )
1  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