Skip to main content
Version: v1.5.0

round

Function

round round a number

Synopsis

round(val: number) -> number

Description

The round function returns the number val rounded to the nearest integer value. which must be a numeric type. The return type retains the type of the argument.

Examples

echo '3.14 -1.5 0 1' | zq -z 'yield round(this)' -

=>

3.
-2.
0
1