ABS function

ABS

 * $$|x| = \left\{

\begin{array}{rl} x, & \text{if } x \geq 0 \\ -x, & \text{if } x < 0. \end{array}\right. $$

Returns the absolute value, or modulus, of a real number.

This can be interpreted as the distance from zero. The absolute value of the difference of two numbers is the distance between them. The function is identical to the square root of the square:


 * $$|x| = \sqrt{x^2}$$