ZVON > References > Haskell reference
| Indexes | Syntax | >> Prelude << | Ratio | Complex | Numeric | Ix | Array | List | Maybe | Char | Monad | IO | Directory | System | Time | Locale | CPUTime | Random

Module: Prelude
Function: signum
Type: Num a => a -> a
Class: Num
Description: it returns -1 for negative numbers, 0 for zero, and 1 for positive numbers
Related: abs, negate

Example 1

Input: signum 3

Output: 1

Example 2

Input: signum (-3.2)

Output: -1.0