Absolute Value Function

Absolute Value Function

Function

abs(x)

Summary

The absolute value returns the distance from zero of the input.

Input

Name Description
x A number

Output

The absolute value function returns the distance from zero of the input number.

 abs(-3) = 3
 abs(-2) = 2
 abs(-1) = 1
 abs(0) = 0
 abs(1) = 1
 abs(2) = 2
 abs(3) = 3