Reactor

Math Functions

Mappings: Functions and Expressions · Updated June 9, 2025

Add and Sum

Description

  1. Returns the sum of two or more numbers, or all numbers in a list.

ℹ️ ADD and SUM are synonymous and can be used interchangeably

Syntax

ADD(value_or_list, [val2, ...]) or SUM(value_or_list, [val2, ...])

Example

  1. ADD(1,2) and SUM(1,2) both return 3

Absolute Value

Description

  1. Returns the absolute value of the parameters supplied. Applies to a list in the first argument's position.

Syntax

ABS(num, [num, ...])

Examples

  1. ABS(10) returns 10

  2. ABS(-10) returns 10

  3. ABS(5-3) returns 2

  4. ABS(3-5) returns 2

  5. ABS(-5,1,-23) returns [5, 1, 23]

  6. ABS(source.total_refund) returns the absolute value of the number in the total_refund field in a data source (this expression will error if the total_refund field is not a number)

Decimal and Number

Description

  1. Converts the text representation of a number into decimal base 10.

ℹ️ DECIMAL and NUMBER are synonymous and can be used interchangeably

Syntax

DECIMAL(value, [value, ...])
or
NUMBER(value, [value, ...])

Examples

  1. DECIMAL(5+10) and NUMBER(5+10) both return 15

  2. DECIMAL(source.Impressions__Google_Ads) converts the Impressions__Google_Ads field in a Google Ads flat file from a string to a number

  3. DECIMAL("D") and NUMBER("D") both return an error

Divide and Quotient

Description

  1. Returns the quotient of one number divided by a second number. This function is equivalent to the / operator.

ℹ️ DIVIDE and QUOTIENT are synonymous and can be used interchangeably

Syntax

DIVIDE(value, [value, ...]) or QUOTIENT(dividend, divisor)

Examples

  1. DIVIDE(4,2) and QUOTIENT(4,2) each return 2.0

  2. ROUND(DIVIDE(10,3),2) and ROUND(QUOTIENT(10,3),2) each return 3.33

Integer

Description

  1. Rounds a number down to the nearest integer that is less than or equal to it.

Syntax

INT(value, [value, ...])

Examples

  1. INT(10.6) returns 10

  2. INT("D") returns an error

Minus and Subtract

Description

  1. Returns the difference between parameters (from first to last). Applies to elements in list if first parameter. This function is equivalent to the - operator.

ℹ️ MINUS and SUBTRACT are synonymous and can be used interchangeably

Syntax

MINUS(value, [value, ...]) or SUBTRACT(value, [value, ...])

Examples

  1. MINUS(5,2) and SUBTRACT(5,2) each return 3

 

Modulo Operator

Description

  1. Returns the result of the modulo operator, i.e., the remainder after a division operation.

Syntax

MOD(dividend, divisor)

Examples

  1. MOD(14,5) returns 4

Multiply and Product

Description

  1. Returns the product of two numbers. This function is equivalent to the * operator.

ℹ️ MULTIPLY and PRODUCT are synonymous and can be used interchangeably

Syntax

MULTIPLY(value, [value, ...]) or PRODUCT(factor1, [factor2, ...])

Examples

  1. MULTIPLY(4,5) and PRODUCT(4,5) each return 20

  2. MULTIPLY(3,8,9) and PRODUCT(3,8,9) each return 216

Negate and U Minus

Description

  1. Negates the arguments passed in. List allowed as first argument to negate all values in list.

ℹ️ NEGATE and UMINUS are synonymous and can be used interchangeably

Syntax

NEGATE(num, [num, ...]) or UMINUS(value)

Examples

  1. NEGATE([1,-2,3]) and UMINUS([1,-2,3]) each return [-1, 2, -3]

  2. NEGATE(source.total_refund) and UMINUS(source.total_refund) each return the total_refund field in the source data negated

Pow and Power

Description

  1. Returns a number raised to a power. This functions are equivalent to the ^ operator.

ℹ️  POW and POWER are synonymous and can be used interchangeably

Syntax

POW(numeric, exponent) or POWER(numeric, exponent)

Examples

  1. POW(2,2), POWER(2,2), and 2^2 all return 4

Round

Description

  1. Rounds a number to a certain number of decimal places according to standard rules.

Syntax

ROUND(numeric, [places])

Examples

  1. ROUND(2.392) returns 2

  2. ROUND(2.392,2) returns 2.39

  3. ROUND(2.392,1) returns 2.4

  4. ROUND(2.922) returns 3

Round Down

Description

  1. Rounds a number to a certain number of decimal places, always rounding down to the next valid increment.

Syntax

ROUNDOWN(numeric, [places])

Examples

  1. ROUNDDOWN(2.9) returns 2.0

  2. ROUNDDOWN(42.249,2) returns 42.24

Round Up

Description

  1. Rounds a number to a certain number of decimal places, always rounding up to the next valid increment.

Syntax

ROUNDUP(numeric, [places])

Examples

  1. ROUNDUP(2.01) returns 3.0

  2. ROUNDUP(42.249,2) returns 42.25