Math

MathFunction Block

Applies a mathematical function to the input signal: exp, log, pow, round, floor, ceil, etc.

Open MathFunction in BlockWerk →

# Math Function Block

Description

Applies a selectable mathematical function to the input signal. Supports exponential, logarithmic, power, remainder, and rounding operations.

Mathematical Model

y = f(u) where f is one of: exp, log, log10, pow(u,n), rem(u,n), round, floor, ceil.

Parameters

function

Select which mathematical function to apply.

constant

Used by pow (exponent) and rem (divisor). Ignored by other functions.

Domain Restrictions

| Function | Valid input domain | Out-of-domain behavior | |----------|-------------------|----------------------| | exp | any real | May overflow for large inputs | | log | x > 0 | Returns -∞ for x ≤ 0 | | log10 | x > 0 | Returns -∞ for x ≤ 0 | | pow | any (see notes) | NaN for negative base with non-integer exponent | | rem | any | Returns 0 if divisor |constant| < 1e-6 | | round | any | Standard rounding (0.5 rounds to even) | | floor | any | Always valid | | ceil | any | Always valid |

Remarks

See Also