Arithmetic Functions in FuseQL
FuseQL supports the following arithmetic functions:
abs
Calculates the absolute value of a numerical value.
- Syntax
-
| abs(<number>) as <alias>
- Example
-
The following example returns A with a value of
42
.| abs(-42) as A
ceil
Rounds up a numerical value to the nearest integer.
- Syntax
-
| ceil(<number>) as <alias>
- Example
-
The following example returns C with a value of
4
.| ceil(3.14) as C
cbrt
Calculates the cube root of a numerical value.
- Syntax
-
| cubeRoot(<number>) as <alias>
- Example
-
The following example returns R with a value of
3
.| cubeRoot(27) as R
exp
Calculates Euler’s number e raised to the power of a numerical value.
- Syntax
-
| exp(<number>) as <alias>
- Example
-
The following example returns E with a value of
2.71828
.| exp(1) as E
expm1
Calculates exp(<number>) − 1
for a numerical value; compensates for round-off errors in exp.
- Syntax
-
| expm1(<number>) as <alias>
- Example
-
The following example returns M with a value of
1.71828
.| expm1(1) as M
floor
Rounds down a numerical value to the nearest integer.
- Syntax
-
| floor(<number>) as <alias>
- Example
-
The following example returns F with a value of
3
.| floor(3.14) as F
log
Calculates the natural logarithm of a numerical value.
- Syntax
-
| log(<number>) as <alias>
- Example
-
The following example returns L with a value of
2.30258
.| log(10) as L
log10
Calculates the base 10 logarithm of a numerical value.
- Syntax
-
| log10(<number>) as <alias>
- Example
-
The following example returns L with a value of
1
.| log10(10) as L