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: negate
Type: Num a => a -> a
Class: Num
Description: change the sign of the number
Related: abs, signum

Example 1

Input: negate 3

Output: -3

Example 2

Input: negate (-3)

Output: 3