{
  "id": 285118,
  "title": "Splitting €10 three ways: the largest remainder method, and the tiebreak everyone forgets",
  "url": "https://urgent.news/2026/08/07/splitting-10-three-ways-the-largest-remainder-method-and-the-tiebreak",
  "topic": "ai",
  "section": "AI",
  "published": "2026-08-07T23:44:05.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/mollenthiel/splitting-eu10-three-ways-the-largest-remainder-method-and-the-tiebreak-everyone-forgets-4aag"
  },
  "original_language": "en",
  "account": "Splitting a total of €10 among three people results in each person receiving €3.33, totaling €9.99. One cent is missing, and it is crucial to determine who should pay the extra cent. This issue is more than just a rounding problem; it can lead to significant discrepancies in larger expense-sharing scenarios. The solution lies in the largest remainder method, an algorithm from 1792 that ensures an exact division of indivisible units based on weights. The method involves calculating each participant's exact share, assigning the floor of each share, and distributing the remaining units based on the largest fractional remainders. Implementing this method in integer cents guarantees that the total sum remains exact, preventing unnoticed errors that can accumulate over multiple expenses. The tiebreak relies on participant IDs to maintain a deterministic and stable result across different runs and recalculations. This approach not only ensures that the total expense is accurately split but also guarantees that each participant's balance sums to exactly zero, providing a reliable test oracle for verifying the correctness of expense-sharing applications.",
  "summary": "Split €10 three ways and you get €3.33, €3.33, €3.33. That is €9.99. One cent has gone missing, and you now have to decide, in code, who pays it. It sounds like a rounding detail. It is not: it is the difference between an app whose numbers close and an app whose numbers almost close. I hit it while building an expense-sharing app, and the fix turned out to be a voting-theory algorithm from the…",
  "key_points": [
    "€10 split among three results in €9.99 due to rounding",
    "Largest remainder method ensures exact division of indivisible units",
    "Participant IDs used for deterministic tiebreak in expense-sharing"
  ],
  "editors_take": "Using the largest remainder method with a deterministic tiebreak ensures accurate division of indivisible units in expense sharing, preventing errors and guaranteeing reliable results in financial transactions.",
  "illustration": "https://urgent.news/ill/285118.png",
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}