Math Expression
Most recent version: v1.2.0
Overview
The Math Expression Action can be used to perform mathematical operations over your data.

In order to configure this action, you must first link it to a Listener. Go to Building a Pipeline to learn how to link.
Ports
These are the input and output ports of this Action:
Configuration
Find Math Expression in the Actions tab (under the Transformation group) and drag it onto the canvas.
To open the configuration, click the Action in the canvas and select Configuration.
Enter the required parameters:
Fields*
The fields view shows a list of integer fields from the connected Listener or Action.
Operation*
You can use these fields to carry out your calculations. Type or drag the fields to create a new operation and write the mathematical operation you wish to do.
Use the corresponding symbols to apply the required operations. Check the list of available operations in the table below.
Add as many operations as required using the Add Operation option.
Output field
Give a name to the output field.
Click Save to complete the process.
List of operations
These are all the available operations you can use in this Action:
Note that you can always use either numeric fields from the incoming data or specific values you type directly in the operation box.
Sum
Sum of 2 values.
field1
+
field2
field1
+
10
Subtraction
Subtraction of 2 values.
field1
-
field2
field1
-
10
Multiplication
Multiplication of 2 values.
field1
*
field2
field1
*
10
Division
Division of 2 values.
field1
/
field2
field1
/
10
Module
The remainder of the division of 2 values.
field1
%
field2
field1
%
10
Power
A value raised to the power of a specific value.
field1
**
field2
field1
**
10
Exponential function
The result of the Euler's number e
raised to the power of a specific value.
EXP(
field
)
Natural logarithm
The natural logarithm of a given value.
LN(
field
)
Logarithm with given base
Calculates the logarithm of a given value with a specific base.
LOG(
base,field
)
Constant π
Add the constant π to your operations.
PI()
Trigonometric functions (in radians)
Calculate the sine, cosine and tangent of a given value.
SIN(
field
)
COS(
field
)
TAN(
field
)
Inverse trigonometric functions
Calculate the arcsine, arccosine and arctangent of a given value.
ASIN(
field
)
ACOS(
field
)
ATAN(
field
)
Hyperbolic functions (in radians)
Calculate the hyperbolic sine, hyperbolic cosine and hyperbolic tangent of a given value.
SINH(
field
)
COSH(
field
)
TANH(
field
)
Inverse hyperbolic functions
Calculate the inverse hyperbolic sine, inverse hyperbolic cosine and inverse hyperbolic tangent of a given value.
ASINH(
field
)
ACOSH(
field
)
ATANH(
field
)
Degrees/radians conversion
These functions convert between radians and degrees.
DEGREES(
field
)
RADIANS(
field
)
Examples
Simple expression with an event field:
2.5 * (${mynumber} + 3)
Transform a number into its opposite one:
-${mynumber}
Negation of a parenthesis:
-(1 + 2) * 3
The module of a division and, then, raised to the power of three:
(${mynumber} % 2) ** 3
Last updated
Was this helpful?