Split $40.12 three ways and a cent goes missing
transcript
Forty dollars twelve. Three people. Split it equally. Each owes 13.37 and a third of a cent. So everyone pays 13.37.
Three times 13.37 is 40.11. One cent has vanished. The restaurant pays for it. On every bill like this. Rounding doesn't add up.
Work in whole cents. Never floats. Give everyone the whole part. 1337 each. That leaves one cent. The spare cent goes to the largest fractional part. Ties, first by name.
Rounding each share: 4011 cents. Largest remainder: 13.38, 13.37, 13.37. Exactly 4012.
Splitting by what each ate uses the same function. Share each dish among its eaters. Then share the total by each guest's food. Tax and service sit on the bill, rounded half up. They follow the food. Same allocate, different weights. That's why the split is a strategy.
Shares must add up to the bill. Cents, and the largest remainder.
Full breakdown in the lecture.