Skip to main content
Version: v1.7.0

sqrt

Function

sqrt square root of a number

Synopsis

sqrt(val: number) -> float64

Description

The sqrt function returns the square root of its argument val, which must be numeric. The return value is a float64. Negative values result in NaN.

Examples

The logarithm of a various numbers:

echo '4 2. 1e10 -1' | zq -z 'yield sqrt(this)' -

=>

2.
1.4142135623730951
100000.
NaN