News for hackers. Stuff that matters.
Re:The Aggregate Magic Algorithms (2015) by moomin on Monday June 19, 2017 @02:50PM (#14589369)
It is... if you're the kind of person who does bit twiddling. And for everyone else it's gobbledygook.

Basically, you're using a binary representation, so everything is in powers of two. Let's just talk integers. 2^n is just the nth bit set and a bunch of zeros. Every number between 2^n and 2^n+1 has the nth digit set and some lower digits. The log base 2 is between n and n+1. So the floor is n. So, biggest digit set=floor of log base 2.

Once you've grasped that principle, the exact details are, in fact, clear. :)

Re:The Aggregate Magic Algorithms (2015) by mikeash on Monday June 19, 2017 @02:53PM (#14589392)
To bring it into less computery terms, it's basically the binary equivalent of the statement that the floor of base 10 log of x is the number of decimal digits in x. The floor of log10 9823 is 4, the floor of log10 874323 is 6, etc. This is, I hope, clear. At least if you understand what log base 10 means.
Re:The Aggregate Magic Algorithms (2015) by moomin on Monday June 19, 2017 @03:02PM (#14589459)
I may spend too much time visualising binary representations. :)
Re:The Aggregate Magic Algorithms (2015) by mikeash on Monday June 19, 2017 @04:44PM (#14590305)
Well, your explanation is better overall, since it's describing what's actually going on. Mine is just an analogy in case that gives someone trouble.