Oct 9, 2026 · 9 min readRounding Line Items So They Add Up: Largest Remainder Allocation in TypeScriptWhy rounding each line breaks the total, and how to fix it for ranges too