Math
Mathematical functions
abs(n)
Returns the absolute value of the given number.
Name | Required | Type | Description |
---|---|---|---|
n |
Yes |
Number |
Number |
abs(10) => 10
abs(-10) => 10
ceiling(n, [scale])
returns n with given scale and rounding mode ceiling.
Name | Required | Type | Description |
---|---|---|---|
n |
Yes |
Number |
|
scale |
No |
Number |
Number |
ceiling(1.576) => 2
ceiling(-1.5) => -1
ceiling(-1.56, 1) => -1.5
decimal(n, scale)
returns n with given scale
Name | Required | Type | Description |
---|---|---|---|
n |
Yes |
Number |
|
scale |
Yes |
Number |
Number |
decimal(1/3, 4) => 0.3333
decimal(2.1477, 2) => 2.15
even(number)
Returns true if number is even, false if it is odd.
Name | Required | Type | Description |
---|---|---|---|
number |
Yes |
Number |
Boolean |
even(5) => false
even(2) => true
exp(number)
Returns the Euler’s number e raised to the power of number.
Name | Required | Type | Description |
---|---|---|---|
number |
Yes |
Number |
Number |
exp(5) => 148.413159102577
floor(n, [scale])
returns n with given scale and rounding mode flooring.
Name | Required | Type | Description |
---|---|---|---|
n |
Yes |
Number |
|
scale |
No |
Number |
Number |
floor(2.1477) => 2
floor(-1.5) => -2
floor(-1.56, 1) => -1.6
log(number)
Returns the natural logarithm (base e) of the number parameter.
Name | Required | Type | Description |
---|---|---|---|
number |
Yes |
Number |
Number |
log(10) => 2.30258509299
modulo(dividend, divisor)
Returns the remainder of the division of dividend by divisor.
Name | Required | Type | Description |
---|---|---|---|
dividend |
Yes |
Number |
|
divisor |
Yes |
Number |
Number |
modulo(12, 5) => 2
number(from, [grouping separator], [decimal separator])
converts from to a number
Name | Required | Type | Description |
---|---|---|---|
from |
Yes |
Text | Number |
|
grouping separator |
No |
Text |
|
decimal separator |
No |
Text |
Number |
number(12) => 12
number("1 002,1417", " ", ",") => 1002.141
number("12,540.25", ",", ".") => 12540.25
odd(number)
Returns true if number is odd, false if it is even.
Name | Required | Type | Description |
---|---|---|---|
number |
Yes |
Number |
Boolean |
odd(5) => true
odd(2) => false
round down(n, scale)
returns n with given scale and rounding mode round down.
Name | Required | Type | Description |
---|---|---|---|
n |
Yes |
Number |
|
scale |
Yes |
Number |
Number |
round down(5.5, 0) => 5
round down(-5.5, 0) => -5
round down(1.121, 2) => 1.12
round half down(n, scale)
returns n with given scale and rounding mode round half down.
Name | Required | Type | Description |
---|---|---|---|
n |
Yes |
Number |
|
scale |
Yes |
Number |
Number |
round half down(5.5, 0) => 5
round half down(-5.5, 0) => -5
round half down(1.121, 2) => 1.12
round half up(n, scale)
returns n with given scale and rounding mode round half up.
Name | Required | Type | Description |
---|---|---|---|
n |
Yes |
Number |
|
scale |
Yes |
Number |
Number |
round half up(5.5, 0) => 6
round half up(-5.5, 0) => -6
round half up(1.121, 2) => 1.12