Lennart Augustsson wrote:
> Simon Marlow wrote:
>
> >
> > Int arithmetic on GHC and Hugs is modulo 2^32, i.e. maxBound + 1.
> >
>
> Actually, if we are in nit-picking mode, arithmetic is modulo (maxBound+1)*2.
PS. I.e., if we interpret "modulo" in the right way since the result is interpreted
as a signed number. Int arithmetic in all Haskell implementations I know of
operate in the same way as C usually does. It has the advantage that you have
the ring properties of + and *, which arithmetic with exceptions would not give you.
-- Lennart