@@ -22,7 +22,7 @@ are your tuples so big?
2222@docs not, (&&), (||), xor, otherwise
2323
2424# Mathematics
25−@docs (+), (-), (*), (/), (^), div, rem, mod, abs, sqrt, clamp, logBase, e
25+@docs (+), (-), (*), (/), (^), (//), rem, (%), abs, sqrt, clamp, logBase, e
2626
2727# Trigonometry
2828@docs pi, cos, sin, tan, acos, asin, atan, atan2
@@ -97,21 +97,29 @@ infixl 7 *
9797infixl 7 /
9898infixl 8 ^
9999
100−infixl 7 `div`
101−infixl 7 `mod`
100+infixl 7 //
101+infixl 7 %
102102infixl 7 `rem`
103103
104104{-| Integer division, remainder is discarded. -}
105−div : Int -> Int -> Int
106−div = Native.Basics.div
105+(//) : Int -> Int -> Int
106+(//) = Native.Basics.div
107107
108−{-| Finds the remainder after dividing one number by another: ``4 `rem` 3 == 1`` -}
108+{-| Finds the remainder after dividing one number by another:
109+
110+ 7 `rem` 2 == 1
111+ -1 `rem` 4 == 1
112+-}
109113rem : Int -> Int -> Int
110114rem = Native.Basics.rem
111115
112−{-| Perform modular arithmetic: ``7 `mod` 2 == 1`` -}
113−mod : Int -> Int -> Int
114−mod = Native.Basics.mod
116+{-| Perform [modular arithmetic](http://en.wikipedia.org/wiki/Modular_arithmetic):
117+
118+ 7 % 2 == 1
119+ -1 % 4 == 3
120+-}
121+(%) : Int -> Int -> Int
122+(%) = Native.Basics.mod
115123
116124{-| Exponentiation: `3^2 == 9` -}
117125(^) : number -> number -> number