The abs function returns the absolute value or modulus of a real number x, denoted as x, is the non-negative value of x without regard to its sign. Namely, x|=x if x is a positive number, and |x = -x is negative (in which case negating x makes -x positive), and 0 = 0. For example, the absolute value of 3 is 3, and the absolute value of −3 is also 3. The absolute value of a number may be thought of as its distance from zero