Skip to content

sqrt

Input Stack:
expr: TimeSeriesExpr
Output Stack:
TimeSeriesExpr

Compute a new time series where each interval has the square root of the value from the input time series. For negative values, the result is NaN following standard mathematical conventions.

Parameters

  • expr: The time series expression to take the square root of

Examples

Demonstrating square root with different constant values:

064-64
0,:sqrt
64,:sqrt
-64,:sqrt

The examples show that √0 = 0, √64 = 8, and √(-64) = NaN.

  • :pow - Exponentiation (square root is equivalent to 0.5,:pow)
  • :abs - Absolute value (often used with sqrt to handle negative values)
  • :mul - Multiplication operation
  • :add - Addition operation