A decades-old bug in Knuth's long division

A decades-old bug in Knuth's long division
TL;DR: The correctness of the algorithm relied on Theorem B, and its proof bugged me.
Longer Read: I was implementing Algorithm D, the well-known long division algorithm from Knuth's "The Art of Computer Programming" , and I stumbled upon an issue that I couldn't let go. It felt unnatural, it took a very convoluted path to proving a simple statement, and it isolated a special case which was not a corner case and that seemed unrelated to the problem at hand.
Read the full story at Kolja →
Related Skills: AlgorithmsSoftware Design
Wider Reading: Project Euler — AlgorithmsRefactoring Guru — Software DesignNeetCode — Algorithms

💬 0 comments

No comments yet — be the first to say what you think.