Skip to content

pow

Input Stack:
exponent: TimeSeriesExpr
base: TimeSeriesExpr
Output Stack:
TimeSeriesExpr
 

Compute a new time series where each interval has the value (base ^ exponent) where base and exponent are the corresponding intervals in the input time series. This performs mathematical exponentiation using standard floating point arithmetic.

Parameters

  • base: The base time series expression (left operand)
  • exponent: The exponent time series expression (right operand)

Examples

Raise a time series to a constant power:

BeforeAfter
name,sps,:eq
name,sps,:eq,
42,:pow

Raise one time series to the power of another:

BeforeAfter
name,sps,:eq,
:sum,
name,requestsPerSecond,:eq,
:max,
(,name,),:by
name,sps,:eq,
:sum,
name,requestsPerSecond,:eq,
:max,
(,name,),:by,
:pow
  • :mul - Multiplication (repeated addition, compared to exponentiation as repeated multiplication)
  • :add - Addition operation
  • :sub - Subtraction operation
  • :div - Division operation
  • :sqrt - Square root (inverse of power of 2)