lua-users home
lua-l archive

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


> There is also this stackoverflow solution[4], but AFAICT it is only
> guaranteed to work for C99 and up ...

If the machine does not use two complement, doing arithmetic over
unsigned versions of signed integers will not give the correct results
anyway (this is the privilege of two-complement arithmetic), so the
conversion back to signed is the least of the problems.

-- Roberto