ABS function

ABS(Number) ABS(Number)

Number

Number or { Number }

The input number.

Returns

Number or { Number }

The absolute value of the given number.

Returns the absolute value of a number. ABS(4)ABS(4) returns 4 and ABS(-4)ABS(-4) returns 4.

An absolute value does not have a sign, meaning that this function essentially removes the sign from negative values, while keeping zero and positive values as-is. The absolute value can be thought of as the value's distance from zero.

Examples

ABS(4)ABS(4)

Returns the absolute value of 4, which is 4.

ABS(-4)ABS(-4)

Returns the absolute value of -4, which is 4.

ABS({ 4, -4 })ABS({ 4; -4 })

Returns the absolute values of 4 and -4 as an array: { 4, 4 }{ 4; 4 }, which is equivalent to { ABS(4), ABS(-4) }{ ABS(4); ABS(-4) }.

ABS(Field1.Value)ABS(Field1,Value)

Returns the absolute value of the value of Field1.