Logarithmic Operation¶
Performs logarithmic and exponential calculations on a single numeric input. Supports custom-base logarithm, natural/base-10/base-2 logarithms, and e^x or 2^x exponentials. The node validates domain constraints (e.g., positive inputs for logs, valid base) and returns 0.0 on invalid inputs.

Usage¶
Use this node whenever you need logarithmic or exponential transformations in a math or data-processing pipeline. Typical workflows include scaling values into log space, converting between different log bases, or applying exponential growth/decay functions before further processing.
Inputs¶
| Field | Required | Type | Description | Example |
|---|---|---|---|---|
| value | True | FLOAT | The numeric input for the selected operation. Must be > 0 for all logarithm operations. | 100.0 |
| base | True | FLOAT | The base used only when operation is 'log' (custom-base logarithm). Must be > 0 and not equal to 1. | 10.0 |
| operation | True | CHOICE | Select the operation to perform. Options: 'log' (custom base), 'ln' (natural log), 'log10' (base-10 log), 'log2' (base-2 log), 'exp' (e^value), 'exp2' (2^value). | log |
Outputs¶
| Field | Type | Description | Example |
|---|---|---|---|
| result | FLOAT | The computed result of the chosen logarithmic or exponential operation. Returns 0.0 if inputs are invalid or an error occurs. | 2.0 |
Important Notes¶
- Domain constraints: For 'log', 'ln', 'log10', and 'log2', value must be > 0. For 'log' specifically, base must be > 0 and not equal to 1.
- Base input usage: The 'base' input is only used for 'log' (custom-base). It is ignored for 'ln', 'log10', 'log2', 'exp', and 'exp2'.
- Error handling: On invalid parameters or runtime errors (e.g., overflow), the node returns 0.0.
- Exponential growth: 'exp' and 'exp2' can grow very large quickly; extreme inputs may lead to overflow and a 0.0 return.
- Precision: Results depend on floating-point precision; tiny numerical differences may occur.
Troubleshooting¶
- Result is 0.0 for logarithm: Ensure value > 0. For 'log', also ensure base > 0 and base != 1.
- Unexpected 0.0 on exponentials: The input may be too large, causing overflow. Try reducing the magnitude of 'value'.
- Base seems to have no effect: The 'base' field is only used when operation is 'log'. It is ignored for 'ln', 'log10', 'log2', 'exp', and 'exp2'.
- Incorrect results: Verify the selected 'operation' matches your intent (e.g., 'log10' vs 'log2') and that 'value' meets the domain constraints.