Returns the inverse sign of each number in a dynamic array.
The
NEGS function inverts the sign of each numeric element of
dynarray. These output values are returned as a dynamic array. A value of 1 is returned as -1, and a value of -1 is returned as 1.
NEGS returns numbers (both numerics and numeric strings) in canonical form, removing multiple signs and leading and trailing zeros from each value. A string is parsed as a number until a non-numeric character is encountered. Thus “7dwarves” is parsed as 7, and returns -7. If an element value is missing or has an empty string or non-numeric value,
NEGS returns 0 (zero).
The
NEGS function inverts the sign of each number in a dynamic array: negative numbers become positive and positive numbers become negative. The
ABSS function gives the absolute value of each number in a dynamic array: all numbers become positive.