The Math operation folds one or more numeric inputs with an arithmetic operator — addition, subtraction, multiplication, division, or modulus — and writes the Float result to a single output.
Addition and multiplication fold commutatively. Subtraction and division are left-associative: Data1 − Data2 − … and Data1 / Data2 / …, so Data1 is the distinguished minuend / dividend. Modulus is restricted to exactly two Data inputs.
To render the Float result as an Integer (truncated or rounded) or a formatted String, chain a Convert node downstream.
With exactly one Data input connected, every operation but Modulus passes that value through unchanged, and the Editor shows an info badge on the Node saying so; Modulus requires exactly two and is exempt. An unconnected Data port is the Task Compiler’s mandatory-input error instead.
Inputs
Port
Type
Required
Description
> (Gate)
Any
No
When connected, a false or Nil value stops the path. See Gate Inputs.
Data
Integer or Float
Yes (first port)
Numeric operand. Up to 20 Data ports total — the first is mandatory, the rest are added on demand in the Node’s Settings tab. Modulus requires exactly 2.
Gate check — If a Gate Input is connected, evaluate it. A false or Nil value stops the execution path; outputs keep their previous values. (Not an error.)
Collect values — Read every Data input. A missing Mandatory input or a non-numeric value invokes the On Error verb.
Fold — The selected operation is applied according to the table above. Division / modulus by zero invokes the On Error verb.
Math can hit these errors: an unconnected Mandatory Data port, a non-numeric value on a Data port (the Type mask catches most of these earlier), division or modulus by zero, or a modulus node with anything other than exactly 2 Data ports.
Any of these routes through the per-op On Error verb and the per-output Fallback value. See the Error Handling guide for full details on the verbs and how they compose with the Fallback editor.
Verb
What it does
Stop this branch (default)
This Node and its dependents stop; Out keeps its value and reads as a failed update.
Continue with the last value
Dependents run on the value Out already holds, not stamped as new; it reads as a failed update.
Continue with the fallback
Dependents run on Out’s per-output Fallback, stamped as this run’s value; it reads as a failed update. The Editor refuses a Task where the Fallback is unset.
Math-specific recipes:
Continue with the fallback + Out → Fallback = 0.0 — emits zero on every failure. The classic “treat divide-by-zero as zero” pattern.
Continue with the fallback + Out → Fallback = NaN — emits quiet NaN, which downstream Compare nodes can detect via “not equal to itself”.
Gate closure is not an error — a closed Gate stops the Path and consults no verb.