News for hackers. Stuff that matters.
Re:My Favorite Programming Problem to Teach: Digit Length by MauranKilom on Monday November 11, 2019 @02:32PM (#21508050)
> But elsethread jepler has shown a solution off Hacker's Delight which which simply multiplies the index of the most significant bit with a magic constant.

...and then checks for and corrects the potential off-by-one thus incurred.

There are no comments on this comment yet.