| n! |
byteint, smallint, integer, bigint |
int8 |
Factorial of the integer n:n×(n-1)×...×1
|
5! |
120 |
| abs(x) |
|
same as x |
Absolute value. |
abs (-17.4) |
17.4 |
| ceil(x) |
numeric |
numeric |
Smallest whole number that is not less than x |
ceil (-42.8) |
-42 |
| dceil(x) |
double precision |
double precision |
Smallest whole number that is not less than x |
dceil (42.8) |
43 |
| dfloor(x) |
double precision |
double precision |
Largest integer not greater than argument |
floor(42.8) |
42 |
| exp(x) |
double precision, numeric |
same as x |
Exponential. |
exp(1.0) |
2.71828182845905 |
| floor(x) |
numeric |
numeric |
largest integer not greater than argument |
floor(-42.8) |
-43 |
| fpow(a,b) |
real |
real |
a raised to the power of b |
pow(9.0, 3.0) |
729 |
| ln(x) |
double precision |
double |
natural logarithm |
ln(2.0) |
0.693147180559945 |
| log(x) |
numeric |
numeric |
base 10 logarithm |
log(100.0) |
2 |
| mod(x,y) |
double precision, real, numeric, byteint,
smallint, integer, bigint |
If the type of either x or y is double precision or a real,
the output type is double precision; otherwise, if either x or y is
numeric, the output is numeric; otherwise, x and y are integers and
the output data type is the wider of the two input data types |
Computes the remainder of x/y |
mod(9,4) |
1 |
| numeric_sqrt(x) |
numeric |
numeric |
square root |
numeric_sqrt(2) |
1.4142 |
| pow(a,b) |
double precision |
dp |
a raised to the power of b |
pow(9.0, 3.0) |
729 |
| round(x) |
double precision, numeric |
same as input |
round to nearest integer |
round(42.4) |
42 |
| round(v,n) |
v is numeric, n is byteint, smallint, integer,
bigint |
numeric |
round to s decimal places |
round(42.4382,2) |
42.44 |
| sign(x) |
numeric |
numeric |
sign of the argument(-1,0,+1) |
sign(-8.4) |
-1 |
| sqrt(x) |
double precision |
double |
square root |
sqrt(2.0) |
1.4142135623731 |
| trunc(x) |
double precision, numeric |
same as input |
truncate toward zero |
trunc(42.8) |
42 |
| trunc(v,n) |
v is numeric, n is byteint, smallint, integer,
bigint |
numeric |
truncate to s decimal places |
trunc(42.4382,2) |
42.43 |