Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: Newbie question

by AnomalousMonk (Archbishop)
on Aug 24, 2022 at 16:10 UTC ( [id://11146376]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Newbie question
in thread Newbie question

... no need to worry about absolute values for this purpose.

Yes, that's the point I was getting at. I also wanted to hint that you don't even need to be concerned with the numbers themselves, but only with the least-significant bit of each number (in 2s'-complement binary representation). The LS bit determines the odd/even status of a number, so adding up all these bits mod 2 (i.e., masking with 1) gives the answer.

Please forgive me if I have not expressed this in a correct formal way ...

No worries. I doubt if I would recognize a correct formal expression of this proposition if you hit me in the face with it.


Give a man a fish:  <%-{-{-{-<

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11146376]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2024-03-29 15:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found