Math Function
MathApplies a selectable mathematical function to the input signal. Supports exponential, logarithmic, power, remainder, and rounding operations.
Mathematical Model
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
- Trigonometric: For sin, cos, tan operations
- SquareRoot: Dedicated nth-root block
- Gain: For simple multiplication by constant