The absolute value function receives a number as input an outputs how far away from zero the input is. With the exception of the input zero, the output of the absolute function is always greater than zero.

In the math-world, an expression inside of vertical bars represents the absolute value function. In the computer-world, the absolute value function is sometimes named

`abs()`

.|5| = 5 |-5| = 5 abs(5) = 5 abs(-5) = 5 |2 x -6| = |-12| = 12 abs(2 x -6) = abs(-12) = 12The following is a mathematical definition for the absolute value function.

For any real number 'n', the absolute value of 'n' is written`|n| and is defined as: |n| = n, if n >= 0 |n| = -n, if n < 0`

```
```

**Creator:** Gerald D. Thurman
[gthurman@gmail.com]

**Created:** 31 January 2007

This work is licensed under a
Creative Commons License.