Urgent.News

What's breaking now, across hundreds of outlets.

Tech

A decades-old bug in Knuth's long division

In the article, the author recounts their experience while implementing Algorithm D, long division from Donald Knuth's "The Art of Computer Programming". While working on the algorithm, the author found a bug that had gone unnoticed for decades in implementations of the algorithm in cryptographic libraries. The author had been avoiding division at all costs while building a library for arithmetic over prime fields, as division is more complex and computationally expensive than multiplication.

The author then decided to implement long division and used Knuth's Algorithm 4.3.1D as a reference. While implementing the algorithm, the author encountered a bug that caused the algorithm to produce incorrect results for certain inputs. This bug was eventually discovered and a theorem on the correctness of the algorithm was created in the author's honor.

Rewritten by urgent.news; may contain errors — check the original.

Source: kolja.rs

Read the original at kolja.rs →

Report a problem with this story

More in Tech

5 things to fix before your Lovable or Bolt app gets real users

By Shubham Maurya , co-founder of BuildKodiq · 2026-11-30 Before real users sign up, fix five things in an app you built with Lovable, Bolt.new, Replit, v0 or Cursor.

  • Implement row-level security policies to control user access to data
  • Remove secret keys from browser and move to server-side functions
  • Use Stripe webhooks for secure payment processing and event verification

If you want failover to work, use it often

  • Failover reliability depends on frequent use, not just backups or tests.
  • Warm standby environments can still have issues due to idle timeouts.
  • Regular, controlled failover practice reveals hidden problems early.

More from Sunday, 29 November 2026 →