News for hackers. Stuff that matters.
Re:My Favorite Programming Problem to Teach: Digit Length by rmetzler on Monday November 11, 2019 @01:00AM (#21502525)
There are other HN comments pointing out that the proposed solution still doesn't work correctly because of floating point operations. If the goal is to learn something about programming, yes, I agree with you. But if the goal is to write code with as few bugs as possible then I would take the "create a string and count chars" solution over every solution involving floating point math.

There are no comments on this comment yet.