Re: >>> ??
From: Igor Tandetnik (itandetnik_at_mvps.org)
Date: 06/10/04
- Next message: Duckwon: "Re: FreeLibrary causes error closing dialog."
- Previous message: Victor Bazarov: "Re: >>> ??"
- In reply to: Brad White: ">>> ??"
- Next in thread: Brad White: "Re: >>> ??"
- Reply: Brad White: "Re: >>> ??"
- Reply: Sven Groot: "Re: >>> ??"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 10 Jun 2004 15:49:35 -0400
"Brad White" <bwhite at inebraska . com> wrote in message
news:Osj0kDyTEHA.2844@TK2MSFTNGP12.phx.gbl
> I've never seen >>> before, and google doesn't handle symbols.
>
> What is going on here?
>
>
> int inthash(int key)
> { key += ~(key << 15);
> key ^= (key >>> 10);
> key += (key << 3);
> key ^= (key >>> 6);
> key += ~(key << 11);
> key ^= (key >>> 16);
> return key;}
Is it Java or C# code, by any chance? I seem to remember that in these
two, >>> means zero-extended right shift, whereas >> is sign-extended
right shift. With the former, vacant bits to the left are filled with
zeros. With the latter, vacant bits to the left are filled with a copy
of the original leftmost bit, thus preserving the sign of the value on
two's complement machines.
--
With best wishes,
Igor Tandetnik
"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken
- Next message: Duckwon: "Re: FreeLibrary causes error closing dialog."
- Previous message: Victor Bazarov: "Re: >>> ??"
- In reply to: Brad White: ">>> ??"
- Next in thread: Brad White: "Re: >>> ??"
- Reply: Brad White: "Re: >>> ??"
- Reply: Sven Groot: "Re: >>> ??"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|