ABS

The function ABS takes a number and returns the absolute value of that number.

This function takes a single Number as input. It outputs the absolute value of that Number.

Declaration

ABS(number) -> absolute_value

 

Parameters

number (required, type: Number)
The number to return the absolute value of.

Return Values

absolute_value (type: Number)
The absolute value of the given number.
The absolute value of a number is the distance that number is from zero, irrespective of the direction. Absolute values will always be positive. 

Examples

The following example takes the number -5 and outputs the absolute value, 5:

ABS(-5) -> 5

The following example takes the number 0.25 and outputs the absolute value, 0.25:

ABS(0.25) -> 0.25