EXP
EXP(x)
Computes e
to the power of x
.
SQL command | Result |
---|---|
SELECT EXP(1) | 2.718281828459045 |
SELECT EXP(0) | 1.0 |
SELECT EXP(null) | null |
POW
POW(x, y)
Computes x
to the power of y
.
SQL command | Result |
---|---|
SELECT POW(2, 5) | 32.0 |
SELECT POW(5, 0) | 1.0 |
SELECT POW(5, null) | null |
POWER
POWER(x, y)
Alias of POW
.
SQRT
SQRT(x)
Computes the square root of x
.
SQL command | Result |
---|---|
SELECT SQRT(4) | 2.0 |
SELECT SQRT(1) | 1.0 |
SELECT SQRT(null) | null |
LN
LN(x)
Computes the natural logarithm of x
.
SQL command | Result |
---|---|
SELECT LN(10) | 2.302585092994046 |
SELECT LN(EXP(5)) | 5.0 |
SELECT LN(null) | null |
SELECT LN(0) | Error: 'division by zero' |
LOG
LOG(x)
Alias of LN
.
LOG10
LOG10(x)
Computes the base-10 logarithm of x
.
SQL command | Result |
---|---|
SELECT LOG10(100) | 2.0 |
SELECT LOG10(1) | 0.0 |
SELECT LOG10(null) | null |
SELECT LOG10(0) | Error: 'division by zero' |
LOG2
LOG2(x)
Computes the base-2 logarithm of x
.
SQL command | Result |
---|---|
SELECT LOG2(32) | 5.0 |
SELECT LOG2(1) | 0.0 |
SELECT LOG2(null) | null |
SELECT LOG2(0) | Error: 'division by zero' |