Thomas ten Cate schrieb:
> There are two ways of looking at the mod operator (on integers):
> 
> 1. As a map from the integers Z to Z/pZ.
> [...]
> 2. As the remainder under division by p.
> Since n mod 0 would be the remainder under division by 0, this
> correctly gives a division by zero error.
> 
> I used to think that the definitions were equivalent... apparently not.

They are if you don't disallow division by zero with remainder. Namely, the
definition of “division with remainder” works as in (1).
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to