Subtract Variadic
Last updated
Last updated
Performs sequential subtraction of multiple numbers, starting with the first value and subtracting each subsequent value. Unlike the basic Subtract node which has fixed inputs, this node can accept any number of values to subtract.
inputs
The list of numbers to subtract sequentially
List
No
value
The result of the sequential subtraction
Number
Drag the Subtract (Variadic) node into your graph.
Connect any number of numeric values to the "inputs" handle.
Each connected value will automatically be added to the inputs list.
Run the graph—the output will be the first value minus all subsequent values.
For example, with inputs [3, 2, 1], the output will be 0 (3-2-1).
You need at least one value for the node to work properly.
Subtraction happens from left to right (first value minus second, result minus third, etc.).
Order matters—the sequence [10, 5, 2] gives a different result (3) than [5, 10, 2] (-7).
Subtract: The standard subtraction node with two fixed inputs.
Add Variadic: For adding multiple values together.
Difference: For calculating the absolute difference between values.
Budget Calculations: Start with a total and subtract multiple expenses.
Time Intervals: Calculate remaining time after subtracting multiple periods.
Inventory Management: Track remaining stock after multiple withdrawals.
Resource Allocation: Calculate remaining capacity after multiple allocations.