Reference/abs

From Kx Wiki
(Difference between revisions)
Jump to: navigation, search
(spelling)
(format)
 
Line 1: Line 1:
= abs =
+
{{refheader|abs|absolute value function}}
  
 
The abs function computes the absolute value of its argument. Null is returned if the argument is null.
 
The abs function computes the absolute value of its argument. Null is returned if the argument is null.

Latest revision as of 04:51, 20 September 2009

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