# ComfyMathExpression Node Documentation

The ComfyMathExpression node evaluates a mathematical formula using a set of input values. You can write an expression using variable names (like `a`, `b`, `c`), and the node will calculate the result. It supports dynamically adding as many input values as needed for your calculation.

## Inputs

| Parameter | Description | Data Type | Required | Range |
|-----------|-------------|-----------|----------|-------|
| `expression` | The mathematical formula to evaluate. You can use variable names that correspond to the input values (default: "a + b"). | STRING | Yes | N/A |
| `values` | A set of numeric or boolean inputs that can be dynamically added. Each input is assigned a letter from the alphabet (a, b, c, ...) to be used as a variable in the expression. At least one input value is required. | FLOAT, INT, BOOLEAN | No | N/A |

**Parameter Constraints:**
*   The `expression` parameter cannot be empty or contain only whitespace.
*   The expression must evaluate to a finite numeric result (INT or FLOAT). Boolean or other non-numeric results will cause an error.
*   The input values for the `values` parameter can be numbers (INT or FLOAT) or boolean values (TRUE/FALSE).
*   At least one input value must be provided in the `values` group.

## Outputs

| Output Name | Description | Data Type |
|-------------|-------------|-----------|
| `FLOAT` | The result of the mathematical expression as a floating-point number. | FLOAT |
| `INT` | The result of the mathematical expression as an integer. | INT |
| `BOOL` | The result of the mathematical expression as a boolean value. | BOOLEAN |

> This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! [Edit on GitHub](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/ComfyMathExpression/en.md)

---
**Source fingerprint (SHA-256):** `d3b47ddb7bc40318d35ad09fb53793cea25e9a9b310ab47aaf937781e3ad2b73`
