Returns the absolute value of a number.
The absolute value of a number is its unsigned magnitude. For example,
ABS(-1) and
ABS(1) both return 1.
ABS returns a number in canonical form; it removes plus and minus signs and leading and trailing zeros from
number. A string is parsed as a number until a non-numeric character is encountered. Thus “7dwarves” is parsed as 7. If
number is the empty string ("") or a non-numeric value,
ABS returns 0 (zero).
The
ABS function gives the absolute value of a number: all numbers become positive. The
NEG function inverts the sign of a number: negative numbers become positive and positive numbers become negative.