Sign Function

Summary

The sign function returns the sign of the number.

Syntax

How to use

The sign function returns the sign of the number. Given a negative number like as input, the function returns as output.

Given zero as input, the function returns zero as output.

Given a positive number like as input, the function returns as output.

Explanation

The sign function is defined in a piecewise manner like this:

Related Functions

Absolute Value

The absolute value returns the distance from zero of the input.