logoalt Hacker News

willguestlast Friday at 12:57 PM3 repliesview on HN

you forgot the logic to strip the final digit and assign it to v.

processing the whole number is absurd


Replies

pkaedinglast Friday at 1:13 PM

I think the idea is to fill in the ellipses with even/odd numbers, up to 4B.

You know, to save the performance cost of processing the input as a string, and chomping off all but the last character.

mgaunardlast Friday at 1:31 PM

Converting to decimal is just as absurd.

All you need is the final binary digit, which incidentally is the most optimal codegen, `v & 1`.

71bwlast Friday at 1:27 PM

Look at Mr. Rocket Scientist over here...