PREVIOUS Order group

NEXT String group

Arithmetic group

1. Absolute value

Description

Returns the non-negative value of a real number without regard to its sign.

Format

abs(arg_1) → result

  • arg_1 : Integer or Float
  • result : Integer or Float

Examples

  Example 1

abs(-4)

    • arg_1 : -4
    • result : 4
  Example 2

abs(1024)

    • arg_1 : 1024
    • result : 1024
  Example 3

abs(-3.14)

    • arg_1 : -3.14
    • result : 3.14
  Example 4

abs(12.34)

    • arg_1 : 12.34
    • result : 12.34

2. Addition, sum, plus / Concatenation

Description

Returns the addition or concatenation of the given elements. Depending on the input types, this operation includes the following options:

  Check here the available options
  • Addition of two or more numbers
  • Addition of two or more durations
  • Addition of a timestamp and a duration, returning a timestamp
  • Concatenation of two or more strings

Format 1

  add(arg_1, arg_s) → result
  • arg_1 : Float or Integer
  • arg_s : Float or Integer
  • result : Float or Integer
  • arg_1 : Duration
  • arg_s : Duration
  • result : Duration
  • arg_1 : String
  • arg_s : String
  • result : String

Format 2

  add(arg_1, arg_2) → result
  • arg_1 : Timestamp
  • arg_2 : Duration
  • result : Timestamp

Examples

  Example 1

add(2, 7)

    • arg_1 : 2
    • arg_1 : 7
    • result : 9
  Example 2

add(10, 0.5, 10)

    • arg_1 : 10
    • arg_1 : 0.5
    • arg_2 : 10
    • result : 20.5
  Example 3

1d + 2d + 5s

    • arg_1 : 1d
    • arg_2 : 2d
    • arg_3 : 5s
    • result : 3d5s
  Example 4

add(timestamp(1484663566720), 10d)

    • arg_1 : timestamp(1484663566720)
    • arg_2 : 10d
    • result : 2017-01-27 15:32:46.72
      where arg_1 = 2017-01-17 15:32:46.72
  Example 5

"hello" + "world" + "1234"

    • arg_1 : hello
    • arg_2 : world
    • arg_3 : 1234
    • result : helloworld1234

Format 1 - arg_s can be used one or more times.

Format 2 - This operation can also be written as arg_1 + arg_s 

3. Ceiling

Description

Rounds a number up, returning the smallest following integer.

Format

ceil(arg_1) → result

  • arg_1 : Float
  • result : Integer

Examples

  Example 1

ceil(1.5)

    • arg_1 : 1.5
    • result : 2
  Example 2

ceil(1234.12345)

    • arg_1 : 1234.12345
    • result : 1235

4. Cube root

Description

Returns the cube root of a specific argument.

Format

cbrt(arg_1) → result

  • arg_1 : Float or Integer
  • result : Float

Examples

  Example 1

cbrt(27)

    • arg_1 : 27
    • result : 3
  Example 2

cbrt(9)

    • arg_1 : 9
    • result : 2.080083823051904

5. Division

Description

Returns the division of two numbers or the division of a duration and a number. When both numbers are integer and the division is not exact, the result will be the value of the quotient.

Format

div(arg_1, arg_2) → result

  • arg_1 : Integer or Float
  • arg_2 : Integer or Float
  • result : Integer
  • arg_1 : Duration
  • arg_2 : Integer
  • result: Duration

Examples

  Example 1

div(27, 3)

    • arg_1 : 27
    • arg_2 : 3
    • result : 9
  Example 2

div(9, 2)

    • arg_1 : 9
    • arg_2 : 2
    • result : 4
  Example 3

div(123.456, 78.9)

    • arg_1 : 123.456
    • arg_2 : 78.9
    • result : 1.5647148288973383
  Example 4

div(123.456, 10)

    • arg_1 : 123.456
    • arg_2 : 10
    • result : 12.345600000000001
  Example 5

div(8d3h10s, 2)

    • arg_1 : 8d3h5s
    • arg_2 : 2
    • result : 4d1h30m5s

This operation can also be written as arg_1 \ arg_2.

6. Floor

Description

Maps a real number to the previous following integer.

Format

floor(arg_1) → result

  • arg_1 : Float
  • result : Integer

Examples

  Example 1

floor(1.5)

    • arg_1 : 1.5
    • result : 1
  Example 2

floor(1234.12345)

    • arg_1 : 1234.12345
    • result : 1234

7. Module

Description

Returns the remainder after the division of one number by another.

Format

mod(arg_1, arg_2) → result

  • arg_1 : Integer
  • arg_2 : Integer
  • result : Integer

Examples

  Example 1

mod(153,5)

    • arg_1 : 153
    • arg_1 : 5
    • result : 3
  Example 2

mod(10, 2)

    • arg_1 : 10
    • arg_1 : 2
    • result : 0
  Example 3

mod(256, 1024)

    • arg_1 : 256
    • arg_1 : 1024
    • result : 256

8. Multiplication

Description

Returns the product of two or more numbers or the product of a number and a duration.

Format 1

  mul(arg_1, arg_s) → result
  • arg_1 : Float or Integer
  • arg_s : Float or Integer
  • result : Float or Integer

Format 2

  mul(arg_1, arg_2) → result
  • arg_1 : Integer
  • arg_s : Duration
  • result : Duration

Examples

  Example 1

mul(2, 7)

    • arg_1 : 2
    • arg_1 : 7
    • result : 14
  Example 2

10 * 0.5 * 10.5)

    • arg_1 : 10
    • arg_1 : 0.5
    • arg_2 : 10.5
    • result : 52.5
  Example 3

mul(8, 10d)

    • arg_1 : 8
    • arg_2 : 10d
    • result : 80

Format 1 - Where arg_s can be used one or more times.

Format 2 - It can also be written as arg_1 * arg_s 

9. Power

Description

Returns the base(arg_1) raised to the power of the exponent(arg_2).

Format

pow(arg_1, arg_2) → result

  • arg_1 : Float or Integer
  • arg_2 : Float or Integer
  • result : Float

Examples

  Example 1

pow(2,7)

    • arg_1 : 2
    • arg_1 : 6
    • result : 64
  Example 2

pow(10,0.5)

    • arg_1 : 10
    • arg_1 : 0.5
    • result : 3.1622776601683795

10. Real division

Description

Returns the real division of two numbers.

Format

  rdiv(arg_1, arg_2) → result
  • arg_1 : Integer or Float
  • arg_2 : Integer or Float
  • result: Float

Examples

  Example 1

rdiv(9, 2)

    • arg_1 : 9
    • arg_2 : 2
    • result: 4.5
  Example 2

rdiv(123.456, 78.9)

    • arg_1 : 123.456
    • arg_2 : 78.9
    • result: 1.5647148288973383
  Example 3

rdiv(123.456, 10)

    • arg_1 : 123.456
    • arg_2 : 10
    • result: 12.345600000000001

It can also be written as arg_1 / arg_2.

11. Rounding

Description

Maps a given real number to the nearest integer or to a given precision in decimal digits.

Format 1

round(arg_1) → result

  • arg_1 : Float or Integer
  • result : Integer

Format 2

round(arg_1, arg_2) → result

  • arg_1 : Float
  • arg_2 : Integer
  • result : Float

Examples

  Example 1

round(3.14)

    • arg_1 : 3.14
    • result : 3
  Example 2

round(9.67987)

    • arg_1 : 9.67987
    • result : 10
  Example 3

round(20.5)

    • arg_1 : 20.5
    • result : 21
  Example 4

round(3.14159265, 3)

    • arg_1 : 3.14159265
    • arg_2 : 3
    • result : 3.142
  Example 5

round(9.60987, 1)

    • arg_1 : 9.60987
    • result : 1
    • result : 9.6
  Example 6

round(20.5, 0)

    • arg_1 : 20.5
    • result : 0
    • result : 21

12. Sign

Description

Extracts the sign of a real number, represented as 1(positive) or -1(negative). Zero value is retrieved as 0.

Format 1

signum(arg_1) → result

  • arg_1 : Float or Integer
  • result : Integer

Examples

  Example 1

signum(27)

    • arg_1 : 27
    • result : 1
  Example 2

signum(-9.123)

    • arg_1 : -9.123
    • result : -1
  Example 3

signum(0)

    • arg_1 : 0
    • result : 0

13. Square root

Description

Returns the square root of a specific argument.

Format

sqrt(arg_1) → result

  • arg_1 : Float or Integer
  • result : Float

Examples

  Example 1

sqrt(4)

    • arg_1 : 4
    • result : 2
  Example 2

sqrt(1024)

    • arg_1 : 1024
    • result : 32

14. Subtraction / Additive inverse

Description

Returns the difference between two numbers / durations / timestamps / duration and timestamp or the additive inverse of a number / duration.

Format 1

  sub(arg_1, arg_2) → result
  • arg_1 : Float or Integer
  • arg_2 : Float or Integer
  • result : Float or Integer
  • arg_1 : Duration
  • arg_2 : Duration
  • result : Duration
  • arg_1 : Timestamp
  • arg_2 : Timestamp
  • result : Duration
  • arg_1 : Timestamp
  • arg_2 : Duration
  • result : Timestamp

Format 2

  sub(arg_1) → result
  • arg_1 : Integer or Float
  • result : Integer or Float
  • arg_1 : Duration
  • result : Duration

Examples

  Example 1

sub(7, 2)

    • arg_1 : 7
    • arg_2 : 2
    • result : 5
  Example 2

sub(10, 0.5)

    • arg_1 : 10
    • arg_2 : 0.5
    • result : 9.5
  Example 3

2d - 1d

    • arg_1 : 2d
    • arg_2 : 1d
    • result : 1d
  Example 4

sub(timestamp(1484663569720), timestamp(1484663566720))

    • arg_1 : timestamp(1484663569720)
    • arg_2 : timestamp(1484663566720)
    • result : 3s
  Example 5

sub(timestamp(1484663566720), 10d)

    • arg_1 : timestamp(1484663566720)
    • arg_2 : 10d
    • result : 2017-01-07 15:32:46.72
      where arg_1 = 2017-01-17 15:32:46.72
  Example 6

-1

    • arg_1 : -1
    • result : 1
  Example 7

sub(100.98)

    • arg_1 : 100.89
    • result : -100.89
  Example 8

sub(-4d10s)

    • arg_1 : -4d10s
    • result : 4d10s

Format 1 - This operation can also be written as arg_1 - arg_2 

Format 2 - This operation can also be written as -arg_1 

Have we answered your question?

If not, please contact our technical support team via email by clicking the button below.

CONTACT US

PREVIOUS Order group

NEXT String group