Skip to main content

Math: Log

Compute the logarithm of a number. The base can be supplied either statically via the Base parameter or dynamically via the base input. When neither is set, falls back to the natural logarithm (ln, base e).

The input must be strictly positive — an input of 0 or less fails the step. The base, when supplied, must be positive and different from 1, otherwise the step fails. A custom base is computed via the change-of-base formula ln(x) / ln(b), so results are approximate decimals (e.g. log base 10 of 100 is a value very close to, but not exactly, 2).

Example
Base: 10 → 100 → 2
Base: 2 → 8 → 3
Base: - → e → 1 (natural log)

Parameters

Base

Static fallback logarithm base. Leave empty for natural logarithm (base e). Common alternatives: 2 (binary log), 10 (decimal log).

Input

Numberrequired

Strictly positive number. Zero or negative inputs fail the step.

Base

Optional dynamic base — overrides the Base parameter when wired. Must be positive and different from 1, otherwise the step fails.

Output

Result
The logarithm of the input.