Blocks
Math
Perform mathematical operations
Perform various mathematical operations including basic arithmetic, trigonometry, statistics, and custom expressions. Supports multiple number formats and precision control.
Block Preview
Math
Perform mathematical operations
Usage
- Add the block to your workflow and connect it to the upstream step.
- Configure any required credentials or tokens in the inputs.
- Fill in required inputs and optional parameters for the run.
- Run a test execution, inspect outputs, and iterate before deploying.
- Deploy the math block with monitoring enabled in production.
Inputs (UI)
Operation
dropdownLayout: half
Options: Add, Subtract, Multiply, Divide
Decimal Precision
short-inputPlaceholder: Number of decimal places (default: 2)
Layout: half
Input A
short-inputPlaceholder: First number
Layout: half
Condition: operation = ["add","subtract","multiply","divide","power","mod"]
Input B
short-inputPlaceholder: Second number
Layout: half
Condition: operation = ["add","subtract","multiply","divide","power","mod"]
Input Value
short-inputPlaceholder: Number to process
Layout: half
Condition: operation = ["sqrt","abs","round","floor","ceil","sin","cos","tan","log"]
Input Numbers
long-inputPlaceholder: Enter numbers separated by commas: 1, 2, 3, 4, 5
Layout: full
Condition: operation = ["min","max","avg","sum"]
Mathematical Expression
long-inputPlaceholder: e.g., (a + b) * c / 2
Layout: full
Condition: operation = ["expression"]
Variables
long-inputPlaceholder: {"a": 10, "b": 20, "c": 5}
Layout: full
Condition: operation = ["expression"]
Min Value
short-inputPlaceholder: Minimum random value
Layout: half
Condition: operation = ["random"]
Max Value
short-inputPlaceholder: Maximum random value
Layout: half
Condition: operation = ["random"]
Angle Unit
dropdownLayout: half
Condition: operation = ["sin","cos","tan"]
Options: Radians, Degrees
Output Format
dropdownLayout: half
Options: Number, String, Scientific, Percentage
Inputs (API)
operation
stringOptional
precision
numberOptional
inputA
numberOptional
inputB
numberOptional
inputValue
numberOptional
inputArray
stringOptional
expression
stringOptional
variables
jsonOptional
minValue
numberOptional
maxValue
numberOptional
angleUnit
stringOptional
outputFormat
stringOptional
Outputs
Primary response type:
{
"content": "string",
"operation": "string",
"result": "number",
"inputs": "json",
"expression": "string",
"unit": "string",
"precision": "number"
}