ZVON > References > Haskell reference |
Intro / Search / ZVON |
| Indexes | Syntax | Prelude | >> Ratio << | Complex | Numeric | Ix | Array | List | Maybe | Char | Monad | IO | Directory | System | Time | Locale | CPUTime | Random |
Module: | Ratio |
---|---|
Operator: | (%) |
Type: | Integral a => a -> a -> Ratio a |
Priority: | 7 |
Description: | The operator ((%)) forms the ratio of two integral numbers, reducing the fraction to terms with no common factor and such that the denominator is positive. |
Related: | denominator, numerator |
Input: 12 % 4
Output: 3 % 1
Input: 5 % 7
Output: 5 % 7
Input: 0 % 23
Output: 0 % 1
Input: (-3) % 6
Output: -1 % 2
Input: 3 % (-6)
Output: -1 % 2
Input: (-3) % (-6)
Output: 1 % 2