CASTI-89 TITANIUM · CALC89
sign(
Returns the sign of a value: 1 for positive and −1 for negative numbers.
Syntax
sign(expr)
- Group
- Number functions
- Arguments
- Takes one value or expression.
- Availability
- Included
Example
| Input | Result |
|---|---|
| sign(-5) | −1 |
Typing sign(-5) on the home screen and pressing ENTER returns −1.
Related commands
- √(Returns the square root of a value.
- abs(Returns the absolute value of a number, or the modulus of a complex number.
- angle(Returns the argument of a complex number, the angle of its point in the complex plane.
- ans(Recalls a previous answer from the home screen history: ans(1) is the last answer, ans(2) the one before.
- ceiling(Returns the smallest integer that is greater than or equal to a value.
- conj(Returns the complex conjugate of a number, with the sign of the imaginary part changed.
- entry(Recalls a previous entry from the home screen history so it can be evaluated again.
- floor(Returns the largest integer that is less than or equal to a value.