[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bitshift of int8, int16, etc?
From: |
John W. Eaton |
Subject: |
Re: bitshift of int8, int16, etc? |
Date: |
Mon, 25 Jun 2007 20:00:10 -0400 |
On 25-Jun-2007, Daniel J Sebald wrote:
| I get your point, but that example is fraught with all kinds of
| compiler casts. The (x << 1) is probably cast to a regular int
| first and then bit shifted.
Yes, that was my point (and it is promoted to int as required by the
C rules for usual arithmetic conversions, so you can remove probably
from the above).
Since no other operations on the intX types in Octave/Matlab do that
kind of promotion, I don't think we should do it for these either. So
there is one immediate difference between how C behaves and how it
seems Octave should for the same operator.
jwe
- Re: bitshift of int8, int16, etc?, (continued)
- Re: bitshift of int8, int16, etc?, John W. Eaton, 2007/06/25
- Re: bitshift of int8, int16, etc?, Daniel J Sebald, 2007/06/25
- Re: bitshift of int8, int16, etc?, Daniel J Sebald, 2007/06/25
- Re: bitshift of int8, int16, etc?, David Bateman, 2007/06/25
- Re: bitshift of int8, int16, etc?, Daniel J Sebald, 2007/06/25
- Re: bitshift of int8, int16, etc?, David Bateman, 2007/06/25
- Re: bitshift of int8, int16, etc?, Daniel J Sebald, 2007/06/25
- Re: bitshift of int8, int16, etc?, Søren Hauberg, 2007/06/25
- Re: bitshift of int8, int16, etc?, John W. Eaton, 2007/06/25
- Re: bitshift of int8, int16, etc?, Daniel J Sebald, 2007/06/25
- Re: bitshift of int8, int16, etc?,
John W. Eaton <=
- Re: bitshift of int8, int16, etc?, Daniel J Sebald, 2007/06/25
- Re: bitshift of int8, int16, etc?, John W. Eaton, 2007/06/25
- Re: bitshift of int8, int16, etc?, David Bateman, 2007/06/26
- Re: bitshift of int8, int16, etc?, John W. Eaton, 2007/06/27