To compute the absolute value, we use the predefined function labs. The function labs returns the absolute value of its argument, just like the function abs, but labs takes an argument of type long and returns a value of type long. The function labs is in the library with header filecstdlib, just like the function abs.