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: rem
Type: Integral a => a -> a -> a
Class: Integral
Priority: 7
Description: returns reminder of integer division of the arguments
Related: (/), div, quot, quotRem, recip
Keywords: division

Example 1

Input: 3 `rem` 12

Output: 3

Example 2

Input: 33 `rem` 12

Output: 9

Example 3

Input: 33 `rem` -12

Output: 9

Example 4

Input: -33 `rem` 12

Output: -9

Example 5

Input: -33 `rem` -12

Output: -9