# Reference/abs

From Kx Wiki

(Difference between revisions)

(spelling) |
Chris Burke (Talk | contribs) (format) |
||

Line 1: | Line 1: | ||

− | + | {{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.