signum package:ghc-internal

Sign of a number. The functions abs and signum should satisfy the law:
abs x * signum x == x
For real numbers, the signum is either -1 (negative), 0 (zero) or 1 (positive).
Used to implement signum for the Num typeclass. This gives 1 for a positive integer, and -1 for a negative integer.

Example

>>> signumInteger 5
1
>>> signum 5
1