Difference between `mod` and `rem` in Haskell
What exactly is the difference between mod and rem in Haskell? Both seems to give the same results *Main> mod 2 3 2 *Main> rem 2 3 2 *Main> mod 10 5 0 *Main> rem 10 5 0 *Main> mod 1 0 *** Exception: divide by zero *Main> rem 1 0 *** Exception: divide by zero *Main> mod 1 (-1) 0 *Main> rem 1 (-1) 0
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.