Re: Q: Fast computation of parity

From: Michael Amling (nospam_at_nospam.com)
Date: 12/31/03


Date: Wed, 31 Dec 2003 02:01:50 GMT

Randy Howard wrote:
> In article <eopIb.16364$aw2.9605800@newssrv26.news.prodigy.com>,
> nospam@nospam.com says...
>
>>>y = x ^ (x>>1);
>>>y = y ^ (x>>2);
>>
>> This x>>2 should be y>>2. As it stands, it finds, for example,
>>parity(8) is even.
>
> Yes, sorry, typo in transcription. Thanks for the correction.

   Also, for this to work when the (1<<31) bit is on in x, x and y have
to be unsigned. :)

--Mike Amling



Relevant Pages

  • Re: Q: Fast computation of parity
    ... >> Yes, sorry, typo in transcription. ... Thanks for the correction. ... Randy Howard 2reply remove FOOBAR ...
    (sci.crypt)
  • Re: r-Squared Question
    ... >> applies ONLY to simple regression. ... Never said THAT was a typo. ... The "careless" was referring to ... Your correction of your own post was this: ...
    (sci.stat.math)
  • Re: New member
    ... LMAO, Thanks for the correction. ... I was only aware if the typo after ... We post a lot around here about guns and dogs. ...
    (misc.fitness.weights)
  • RE: Setting up query with multiple data
    ... for "C04" in the string. ... > I have made correction and am still unable to get it to work. ... Below corrects the typo. ... >>> Please review my query and tell me where I made my error. ...
    (microsoft.public.access.queries)
  • Re: Quantum Entanglement and FTL information transfer
    ... > understand the difference between a purely imaginary function and a complex ... Just a correction of Bill's typo. ... letters of the alphabet for email. ...
    (sci.physics)