Summary
Share percentages must be calculated using integer arithmetic to avoid floating-point drift (e.g. 1/3 = 33.333…%). Unit tests should confirm the calculator returns correct percentages, that all shares sum to exactly 100%, and that the remainder is assigned to the largest investor.
Scope
- Test three equal investors of 3000 each (total 9000) each get 33% with 1% remainder assigned to the first investor
- Test two investors with 2500 and 7500 get 25% and 75% exactly
- Test a single investor gets 100%
- Assert the sum of all returned percentages equals exactly 100
- Assert remainder always assigned to the investor with the largest commitment
Acceptance Criteria
ETA: 12 hours
Coordinate on Telegram
Summary
Share percentages must be calculated using integer arithmetic to avoid floating-point drift (e.g. 1/3 = 33.333…%). Unit tests should confirm the calculator returns correct percentages, that all shares sum to exactly 100%, and that the remainder is assigned to the largest investor.
Scope
Acceptance Criteria
ETA: 12 hours
Coordinate on Telegram