[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.2.0 (work1) now available
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 18 Jan 2010 12:40:30 -0200
> > 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)
6.5.7
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