Get Sign (Sign)

What is it?

The Sign function accepts a single numeric value and returns one of three values depending on whether it is less than, equal to or greater than zero. The value returned will be -1 if your evaluated number is negative, 0 if it is zero, or 1 if it is positive. This resultant value is known as the Sign of the original number.

What is the Syntax?

The Sign function’s syntax is as follows:

Sign( Argument );

Why might I want to use this?

In the previous section, we introduced the Abs function, which extracts the absolute value of a number. Any real number is the product of its sign and its absolute value. For that reason, if you wanted to separate the absolute value and signum, then recombine them later, you would use the two functions in tandem.

 

<< Previous: Absolute (Abs) | Next: Ceiling (Ceil) >>