Calculates the square root of a scalar or series.
SQRT(val)
val |
- |
A scalar, series or table. |
A real or complex scalar or a real or complex series.
W1: {1, 4, 9, 16}
W2: sqrt(W1)
W2 == {1, 2, 3, 4} where each value is the square root of the corresponding value in W1.
W1: -3..3
W2: sqrt(W1)
W1 == {-3, -2, -1, 0, 1, 2, 3}
W2 == {0 + 1.7321i, 0 + 1.4142i, 0 + 1i, 0, 1, 1.4142 + 0i, 1.7321 + 0i}
Although the series in W1 is purely real, the square root of the series is complex.
sqrt(-1)
returns 0 + 1i
sqrt(-1 + 0i)
returns 0 + 1i.
SQRT returns a complex series or scalar if the input value is complex or real and negative.