Skip to content

abs

Absolute value

abs x    abs[x]

Where x is a numeric or temporal, returns the absolute value of x. Null is returned if x is null.

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

Implicit iteration

abs is an atomic function.

q)abs(10;20 -30)
10
20 30

It applies to dictionaries and tables.

Domain and range

domain b g x h i j e f c s p m d z n u v t
range  i . i h i j e f i . p m d z n u v t

Range: ihjefpmdznuvt


signum
Mathematics

Back to top