Russ Cox 1/10/2026

Pulling a New Proof from Knuth’s Fixed-Point Printer

Read Original

This technical article presents a new, clearer proof for the correctness of Donald Knuth's 1989 program (P2) for converting 16-bit fixed-point binary fractions to the shortest accurate decimal representation. It starts with a simpler, trivially correct program and transforms it step-by-step into Knuth's version, proving each transformation. The post also discusses alternative solutions and reflects on how programming language choices shape proofs and programs.

Pulling a New Proof from Knuth’s Fixed-Point Printer

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

No top articles yet