Skip to main content Skip to complementary content

SIGN

Returns the signum function of the given input, that is:

  • 0 if the argument is 0
  • 1 if the argument is greater than 0
  • -1 if the argument is less than 0

Syntax

SIGN(X)

Arguments

X

Type: numeric

A numeric value.

Returns

Type: same as input

A value 1, 0, or -1 indicating the sign of X.


Examples

X Output
1 1
-1 -1
0 0
1.1 1.0
-1.35 -1.0
3 1

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!