EasyUse/Logic/Mathgenerated
Math Int(mathIntOperation)
The Math Int node performs an integer arithmetic operation between two integer inputs, a and b, and returns the result as an INT.
math Int Operation
INT
a
0
b
0
operation
COMBO
Easy Use
The Math Int node performs an integer arithmetic operation between two integer inputs, a and b, and returns the result as an INT. It is grouped under EasyUse/Logic/Math.
Inputs
-
a (
INT, required): The first operand.
Default:0
Min:-18446744073709552000
Max:18446744073709552000
Step:1 -
b (
INT, required): The second operand.
Default:0
Min:-18446744073709552000
Max:18446744073709552000
Step:1 -
operation (
COMBO, required): The arithmetic operation to apply. Available options:add— Returnsa + bsubtract— Returnsa - bmultiply— Returnsa * bdivide— Returnsa / busing integer semanticsmodulo— Returns the remainder ofa / bpower— Returnsaraised to the power ofb
Outputs
INT: The result of the selected operation. The output is an integer value.
Usage Notes
- Both inputs and the output are integer-typed, so this node is useful for exact integer math in ComfyUI workflows where floating-point precision is not needed.
- The
divideoperation returns an integer result; any fractional part is not preserved. Similarly,powerwith a negative exponent can produce a non-integer result that will be reduced to an integer because the output type isINT. - Be careful with
b = 0fordivideandmodulo, and witha = 0combined with a negative exponent inpower, since these operations are mathematically undefined or can cause errors. - The node can be chained with other Math Int nodes by connecting the
INToutput to theaorbinput of another instance.
Comments
Sign in with GitHub to join the discussion.