FA-62344 / Tax bracket computation / Member archive
The whole income is taxed at the rate of its highest bracket · case 04
Crossing a threshold by one dollar raises tax on every dollar of income.
Case contract
solve(income, brackets): brackets is [[upper, rate_percent], ...] with strictly increasing positive uppers and a final open bracket [None, rate]; otherwise return 'ERR:brackets'. Each rate applies only to the slice of income in (previous upper, upper]. Negative income is taxed as zero. The tax is summed exactly and rounded half-up to cents once, returned as integer cents.
Why this case matters
Tax computations hinge on which slice, threshold, ordering and rounding rule applies at each step; a misplaced boundary silently misstates liabilities.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression whole-income-at-top-rate 1 | 8196943 | 5673643 | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗