Int Math Operation¶
Performs basic integer arithmetic on two inputs. Supports addition, subtraction, multiplication, integer division, modulo, and exponentiation. Division and modulo handle zero safely by returning 0.

Usage¶
Use this node whenever you need deterministic integer math within a workflow, such as counters, index calculations, loop increments/decrements, or preparing integer parameters for other nodes. Choose the desired operation and provide two integer operands.
Inputs¶
| Field | Required | Type | Description | Example |
|---|---|---|---|---|
| a | True | INT | First integer operand. | 10 |
| b | True | INT | Second integer operand. | 3 |
| operation | True | CHOICE | Mathematical operation to perform on the two integers. Options: add, subtract, multiply, divide (integer division), modulo, power. | subtract |
Outputs¶
| Field | Type | Description | Example |
|---|---|---|---|
| result | INT | The result of the selected integer operation. | 7 |
Important Notes¶
- Division uses integer division (a // b).
- Division by zero and modulo by zero are guarded and will return 0.
- If an unknown operation is provided or an error occurs, the node returns 0.
- Input values are integers and are constrained by very large min/max bounds; ensure values are within the UI-allowed range.
- Exponentiation (power) can grow quickly; use with care.
Troubleshooting¶
- Result is 0 unexpectedly: Verify that b is not 0 for divide/modulo and that the chosen operation is correct.
- Non-integer behavior observed: Ensure both inputs are integers; this node performs integer math (e.g., divide truncates toward negative infinity).
- Overflow or extremely large results: Check inputs for large exponents or products; consider smaller values or a float operation node if appropriate.
- Wrong operation applied: Reconfirm the 'operation' choice from the list [add, subtract, multiply, divide, modulo, power].