abs

num abs(num x)

num - any numeric type (int or fixed)

Description

Returns the absolute value of x.

abs(INT_MIN) returns INT_MIN.

Examples

abs( 2.1) -> 2.1
abs(-2.1) -> 2.1
abs( 123) -> 123
abs(-123) -> 123