ComfyUI Node
XMath
Mathematical operation node supporting addition, subtraction, multiplication, division, power, and modulo operations with dual output format.
XMath
- input_a
- input_b
- int_result
- float_result
◄basic_a0.0►
◄basic_b0.0►
◄operationAddition (+)►
◄use_input_atrue►
◄use_input_btrue►
◄swap_abfalse►
Category♾️ Xz3r0/Workflow-Processing
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| basic_a | FLOAT | 0.0-10000000000–10000000000 | basic value A (FLOAT) |
| basic_b | FLOAT | 0.0-10000000000–10000000000 | basic value B (FLOAT) |
| operation | COMBO | Addition (+) | Mathematical operation type |
| use_input_a | BOOLEAN | true | use input value A (input_a takes precedence when enabled, fallbacks to basic_a if not connected to other node) |
| use_input_b | BOOLEAN | true | use input value B (input_b takes precedence when enabled, fallbacks to basic_b if not connected to other node) |
| swap_ab | BOOLEAN | false | swap a and b values |
| input_aopt | COMFY_MATCHTYPE_V3 | Optional numeric input A (allows INT or FLOAT independently from input B, takes priority when use_input_a is enabled) | |
| input_bopt | COMFY_MATCHTYPE_V3 | Optional numeric input B (allows INT or FLOAT independently from input A, takes priority when use_input_b is enabled) |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| int_result | INT | Integer result (truncated decimal part towards zero) |
| float_result | FLOAT | Float result (exact value with decimal) |