Power
systemic:core-powMathfunction1 crInputs
| Name | Type | Description |
|---|---|---|
| Second Value | floatarray | The power to raise the base to. |
| First Value | floatarray | The base value to raise to a power. |
Outputs
| Name | Type | Description |
|---|---|---|
| Pow | floatarray | The element-wise power result (Base ^ Exponent). |
Raises each element of the first input to the power of the corresponding element in the second. Essential for compound growth, volatility calculations, and non-linear scaling.
| Base (A) | Exponent (B) | Result |
|---|---|---|
| 2 | 3 | 8 |
| 4 | 0.5 | 2 |
| 10 | -1 | 0.1 |
| 5 | 0 | 1 |
Missing Data
If either input is missing (null) at a position — a data gap or a closed-market day — the result at that position is null. The module never invents a value for missing data: a gap in your inputs stays a gap in the output.
| Base | Exponent | Result |
|---|---|---|
| 2 | null | null |
| null | 3 | null |
| null | null | null |
In live execution the module returns exactly one datapoint — the newest position — which is null when it cannot be determined.
Special Cases
⚠️ Important: Separate from missing data, a result can be mathematically undefined for real inputs:
| Scenario | Result | Notes |
|---|---|---|
| Negative base + fractional exponent | null | Undefined in real numbers (would be complex) |
| 0 raised to negative power | inf | Division by zero |
| Very large exponent | inf | Overflow |
Example: → null (would be in complex math)
Infinite results pass through unchanged — they are values, not gaps.
Common Exponents
| Exponent | Operation | Use Case |
|---|---|---|
| 2 | Square | Variance from std dev |
| 0.5 | Square root | Std dev from variance |
| -1 | Reciprocal | Inverse weighting |
| 0 | Any base → 1 | Reset to constant |
Input Alignment
Systemic automatically aligns inputs before calculation:
| Scenario | What Happens |
|---|---|
| Different lengths | Shorter series padded by repeating last value |
| Different frequencies | Lower-frequency upsampled to match higher |
| One constant | Constant expanded to match series length |
Practical Example: Compound Growth
Calculate future value with compound interest:
| Annual Rate | Years | Growth Factor |
|---|---|---|
| 5% | 10 | |
| 7% | 20 | |
| 10% | 30 |
Connect a growth factor series (1 + return) to the base and time periods to the exponent for dynamic compounding calculations.
Related Modules
- SQRT — Square root (equivalent to exponent 0.5)
- MUL — Repeated multiplication
- DIV — Reciprocal (equivalent to exponent -1)
Interpretation Tips
- Exponent > 1: Spreads out values, makes large larger and small smaller
- 0 < Exponent < 1: Compresses spread, brings extremes closer to center
- Exponent < 0: Inverts the scale (reciprocal-like)
- Exponent = 0: Everything becomes 1
Advantages
- Non-linear transformations — Essential for many financial calculations
- Flexible — Squares, roots, reciprocals all in one module
- Element-wise — Works naturally with time series
Disadvantages
- Undefined cases — Negative bases with fractional exponents produce null
- Overflow risk — Large exponents can produce infinity
- Interpretation — Results may lose intuitive meaning at extreme exponents