BlockWerk Documentation
f(x)

Math Function

Math

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

Simulate in BlockWerk

Interactive sandbox directly in your browser — zero installation, WASM-powered.

Simulate in BlockWerk →

Mathematical Model

y(t)=f(u(t))y(t) = f(u(t))

Inputs & Outputs

Direction ID Label Type Status
→ In in Input number Required
← Out out Output number Output

Parameters

Parameters Label Type Default Description
function Function select exp
constant Constant (n) number 2

Usage Examples

  • Zie de ingebouwde voorbeelden in de handleiding voor een demonstratie van dit blok.

Remarks & Best Practices

  • log/log10: Returns -infinity for non-positive inputs (no NaN propagation).
  • rem: Returns 0 if constant magnitude is less than 1e-6 (division protection). The threshold is intentionally larger than machine epsilon to avoid floating-point issues.
  • pow: Supports fractional exponents (e.g., 0.5 for square root). Negative bases with non-integer exponents produce NaN.
  • Unknown function: Produces NaN output to signal configuration error. Check the function parameter spelling.

Related Components