lua-users home
lua-l archive

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

> > You do not present any arguments. Actual use cases show that there
> > is a need. Existing bit libraries offer this functionality for
> > that reason, too.
> I agree with you on this. Arithmetic right shift is a primitive
> operation and I couldn't live without it.

Just a remind: at least we would be in good company, as ANSI C does not
offer this operation too :)

  ISO/IEC 9899:1999 (E)
  The result of E1 >> E2 is E1 right-shifted E2 bit positions.  If E1
  has an unsigned type or if E1 has a signed type and a nonnegative
  value, the value of the result is the integral part of the quotient of
  E1 / 2E2.  If E1 has a signed type and a negative value, the resulting
  value is implementation-defined.

-- Roberto