Rounding Direction for Cost Increases: Why Price Rises and Break-Even Limits Differ
A supplier raising prices 8% while rent and wages rise 5% forces a business to ask whether it can absorb the hit. Two figures answer this: the price increase needed to recover the extra cost, and the largest uniform cost rise that still breaks even. The article shows these must be rounded in opposite directions, since the recovery price must round up to cover any shortfall, while the break-even limit must round down so a survivable rise is never overstated. It implements this in BigInt integer cents and basis points, noting that truncating division only acts as a floor for non-negative values, so profit is computed by subtraction. Example figures give a 6.5% price rise and a 5.85% break-even limit, and two assertions check that the price rise covers the extra cost and the limit still breaks even.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in