Reference/abs

From Kx Wiki
Jump to: navigation, search

abs (absolute value function)

The abs function computes the absolute value of its argument. Null is returned if the argument is null.

Syntax

q)r:abs X

Example

q)abs -1.0
1f
q)abs 10 -43 0N
10 43 0N

For a complete list of functions, see the kdb+ Function Reference.

Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox