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.
Related Skills:
AlgorithmsSoftware Design
💬 0 comments