lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


liam mail <liam.list@googlemail.com> writes:
> "In case of overflows in integer arithmetic, all operations wrap around,
> according to the usual rules of two-complement arithmetic."
>
> Usual rules of two complement arithmetic? Would some care to explain as in
> C signed ints do not wrap.

Well to be fair, it doesn't say "C signed ints," and the behavior of
twos-complement signed values are clear enough...

-miles

-- 
People who are more than casually interested in computers should have at
least some idea of what the underlying hardware is like.  Otherwise the
programs they write will be pretty weird.  -- Donald Knuth